remoteproc: using pm_runtime_resume_and_get instead of pm_runtime_get_sync
authorMinghao Chi <chi.minghao@zte.com.cn>
Mon, 11 Apr 2022 01:36:56 +0000 (01:36 +0000)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Mon, 18 Jul 2022 20:32:34 +0000 (15:32 -0500)
Using pm_runtime_resume_and_get is more appropriate
for simplifing code

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220411013656.2517150-1-chi.minghao@zte.com.cn
drivers/remoteproc/keystone_remoteproc.c

index 54781f553f4e509fddc7c44cca269f01ed92c8b2..594a9b43b7ae7c820f61e2f81ceded8ce37a7b4e 100644 (file)
@@ -410,10 +410,9 @@ static int keystone_rproc_probe(struct platform_device *pdev)
 
        /* enable clock for accessing DSP internal memories */
        pm_runtime_enable(dev);
-       ret = pm_runtime_get_sync(dev);
+       ret = pm_runtime_resume_and_get(dev);
        if (ret < 0) {
                dev_err(dev, "failed to enable clock, status = %d\n", ret);
-               pm_runtime_put_noidle(dev);
                goto disable_rpm;
        }