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

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.netSigned-off-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
parent 632f1ca3
...@@ -624,8 +624,8 @@ static int wcnss_probe(struct platform_device *pdev) ...@@ -624,8 +624,8 @@ static int wcnss_probe(struct platform_device *pdev)
wcnss->stop_ack_irq = ret; wcnss->stop_ack_irq = ret;
if (wcnss->stop_ack_irq) { 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); &wcnss->stop_bit);
if (IS_ERR(wcnss->state)) { if (IS_ERR(wcnss->state)) {
ret = PTR_ERR(wcnss->state); ret = PTR_ERR(wcnss->state);
goto detach_pds; goto detach_pds;
...@@ -659,7 +659,6 @@ static int wcnss_remove(struct platform_device *pdev) ...@@ -659,7 +659,6 @@ static int wcnss_remove(struct platform_device *pdev)
of_platform_depopulate(&pdev->dev); of_platform_depopulate(&pdev->dev);
qcom_smem_state_put(wcnss->state);
rproc_del(wcnss->rproc); rproc_del(wcnss->rproc);
qcom_remove_sysmon_subdev(wcnss->sysmon); qcom_remove_sysmon_subdev(wcnss->sysmon);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment