Skip to content

Commit d951269

Browse files
ran jianpingJassiBrar
authored andcommitted
mailbox: omap: using pm_runtime_resume_and_get to simplify the code
Using pm_runtime_resume_and_get() to replace pm_runtime_get_sync and pm_runtime_put_noidle. This change is just to simplify the code, no actual functional changes. Reported-by: Zeal Robot <[email protected]> Signed-off-by: ran jianping <[email protected]> Signed-off-by: Jassi Brar <[email protected]>
1 parent 504ff5b commit d951269

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

drivers/mailbox/omap-mailbox.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -856,11 +856,9 @@ static int omap_mbox_probe(struct platform_device *pdev)
856856
platform_set_drvdata(pdev, mdev);
857857
pm_runtime_enable(mdev->dev);
858858

859-
ret = pm_runtime_get_sync(mdev->dev);
860-
if (ret < 0) {
861-
pm_runtime_put_noidle(mdev->dev);
859+
ret = pm_runtime_resume_and_get(mdev->dev);
860+
if (ret < 0)
862861
goto unregister;
863-
}
864862

865863
/*
866864
* just print the raw revision register, the format is not

0 commit comments

Comments
 (0)