slimbus: qcom-ngd-ctrl: Balance pm_runtime enablement for NGD
The pm_runtime_enable() and pm_runtime_use_autosuspend() calls are
supposed to be balanced on exit, add these calls.
Fixes: 917809e228 ("slimbus: ngd: Add qcom SLIMBus NGD driver")
Cc: stable@vger.kernel.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>
Signed-off-by: Srinivas Kandagatla <srini@kernel.org>
Link: https://patch.msgid.link/20260530204421.116824-8-srini@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
07c564ea5f
commit
6a003446b7
1 changed files with 5 additions and 1 deletions
|
|
@ -1582,8 +1582,11 @@ static int qcom_slim_ngd_probe(struct platform_device *pdev)
|
|||
pm_runtime_enable(dev);
|
||||
pm_runtime_get_noresume(dev);
|
||||
ret = qcom_slim_ngd_qmi_svc_event_init(ctrl);
|
||||
if (ret)
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "QMI service registration failed:%d", ret);
|
||||
pm_runtime_dont_use_autosuspend(dev);
|
||||
pm_runtime_disable(dev);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
@ -1696,6 +1699,7 @@ static void qcom_slim_ngd_remove(struct platform_device *pdev)
|
|||
{
|
||||
struct qcom_slim_ngd_ctrl *ctrl = platform_get_drvdata(pdev);
|
||||
|
||||
pm_runtime_dont_use_autosuspend(&pdev->dev);
|
||||
pm_runtime_disable(&pdev->dev);
|
||||
qcom_slim_ngd_enable(ctrl, false);
|
||||
qcom_slim_ngd_exit_dma(ctrl);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue