Commit 81311569 authored by Stephan Gerhold's avatar Stephan Gerhold Committed by Bjorn Andersson
Browse files

remoteproc: qcom_wcnss: Use devm_qcom_smem_state_get()



Use the new managed devm_qcom_smem_state_get() variant instead of
calling qcom_smem_state_put() explicitly in remove() to simplify the
code a bit.

Signed-off-by: default avatarStephan Gerhold <stephan@gerhold.net>
Link: https://lore.kernel.org/r/20210618111556.53416-3-stephan@gerhold.net


Signed-off-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
parent 632f1ca3
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -624,7 +624,7 @@ static int wcnss_probe(struct platform_device *pdev)
	wcnss->stop_ack_irq = ret;

	if (wcnss->stop_ack_irq) {
		wcnss->state = qcom_smem_state_get(&pdev->dev, "stop",
		wcnss->state = devm_qcom_smem_state_get(&pdev->dev, "stop",
							&wcnss->stop_bit);
		if (IS_ERR(wcnss->state)) {
			ret = PTR_ERR(wcnss->state);
@@ -659,7 +659,6 @@ static int wcnss_remove(struct platform_device *pdev)

	of_platform_depopulate(&pdev->dev);

	qcom_smem_state_put(wcnss->state);
	rproc_del(wcnss->rproc);

	qcom_remove_sysmon_subdev(wcnss->sysmon);