Skip to content

Commit 8131156

Browse files
stephan-ghandersson
authored andcommitted
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: Stephan Gerhold <stephan@gerhold.net> Link: https://lore.kernel.org/r/20210618111556.53416-3-stephan@gerhold.net Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
1 parent 632f1ca commit 8131156

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

drivers/remoteproc/qcom_wcnss.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -624,8 +624,8 @@ static int wcnss_probe(struct platform_device *pdev)
624624
wcnss->stop_ack_irq = ret;
625625

626626
if (wcnss->stop_ack_irq) {
627-
wcnss->state = qcom_smem_state_get(&pdev->dev, "stop",
628-
&wcnss->stop_bit);
627+
wcnss->state = devm_qcom_smem_state_get(&pdev->dev, "stop",
628+
&wcnss->stop_bit);
629629
if (IS_ERR(wcnss->state)) {
630630
ret = PTR_ERR(wcnss->state);
631631
goto detach_pds;
@@ -659,7 +659,6 @@ static int wcnss_remove(struct platform_device *pdev)
659659

660660
of_platform_depopulate(&pdev->dev);
661661

662-
qcom_smem_state_put(wcnss->state);
663662
rproc_del(wcnss->rproc);
664663

665664
qcom_remove_sysmon_subdev(wcnss->sysmon);

0 commit comments

Comments
 (0)