Skip to content

Commit 2b70425

Browse files
Minghao Chinmenon
authored andcommitted
soc: ti: pm33xx: using pm_runtime_resume_and_get instead of pm_runtime_get_sync
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
1 parent b9e8a7d commit 2b70425

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

drivers/soc/ti/pm33xx.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -555,11 +555,9 @@ static int am33xx_pm_probe(struct platform_device *pdev)
555555
#endif /* CONFIG_SUSPEND */
556556

557557
pm_runtime_enable(dev);
558-
ret = pm_runtime_get_sync(dev);
559-
if (ret < 0) {
560-
pm_runtime_put_noidle(dev);
558+
ret = pm_runtime_resume_and_get(dev);
559+
if (ret < 0)
561560
goto err_pm_runtime_disable;
562-
}
563561

564562
ret = pm_ops->init(am33xx_do_sram_idle);
565563
if (ret) {

0 commit comments

Comments
 (0)