soc: ti: pm33xx: using pm_runtime_resume_and_get instead of pm_runtime_get_sync
authorMinghao Chi <chi.minghao@zte.com.cn>
Mon, 18 Apr 2022 06:30:59 +0000 (06:30 +0000)
committerNishanth Menon <nm@ti.com>
Tue, 3 May 2022 11:58:10 +0000 (06:58 -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: Tony Lindgren <tony@aotmide.com>
Link: https://lore.kernel.org/r/20220418063059.2558074-1-chi.minghao@zte.com.cn
drivers/soc/ti/pm33xx.c

index 7bab4bbaf02dc7873d9002311457f17570caf382..ce09c42eaed259df492ccc51b7d5542531435259 100644 (file)
@@ -555,11 +555,9 @@ static int am33xx_pm_probe(struct platform_device *pdev)
 #endif /* CONFIG_SUSPEND */
 
        pm_runtime_enable(dev);
-       ret = pm_runtime_get_sync(dev);
-       if (ret < 0) {
-               pm_runtime_put_noidle(dev);
+       ret = pm_runtime_resume_and_get(dev);
+       if (ret < 0)
                goto err_pm_runtime_disable;
-       }
 
        ret = pm_ops->init(am33xx_do_sram_idle);
        if (ret) {