OSDN Git Service

soc: ti: pruss: using pm_runtime_resume_and_get instead of pm_runtime_get_sync
authorMinghao Chi <chi.minghao@zte.com.cn>
Fri, 8 Apr 2022 08:08:53 +0000 (08:08 +0000)
committerNishanth Menon <nm@ti.com>
Mon, 11 Apr 2022 13:46:09 +0000 (08:46 -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: Nishanth Menon <nm@ti.com>
Reviewed-by: Dave Gerlach <d-gerlach@ti.com>
Link: https://lore.kernel.org/r/20220408080853.2494292-1-chi.minghao@zte.com.cn
drivers/soc/ti/pruss.c

index b367793..0e4ba0f 100644 (file)
@@ -279,10 +279,9 @@ static int pruss_probe(struct platform_device *pdev)
        platform_set_drvdata(pdev, pruss);
 
        pm_runtime_enable(dev);
-       ret = pm_runtime_get_sync(dev);
+       ret = pm_runtime_resume_and_get(dev);
        if (ret < 0) {
                dev_err(dev, "couldn't enable module\n");
-               pm_runtime_put_noidle(dev);
                goto rpm_disable;
        }