Skip to contentSkip to conversation

mailbox: omap: using pm_runtime_resume_and_get to simplify the code

PATCH New [email protected] 1 participant 1 message Apr 28, 2022 Mailbox API

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mailbox: omap: using pm_runtime_resume_and_get to simplify the code

From: ran jianping <[email protected]>

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.

---
 drivers/mailbox/omap-mailbox.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/mailbox/omap-mailbox.c +2 -4
index 58f3d569f095..098c82d87137 100644
@@ -856,11 +856,9 @@ static int omap_mbox_probe(struct platform_device *pdev)
 	platform_set_drvdata(pdev, mdev);
 	pm_runtime_enable(mdev->dev);
 
-	ret = pm_runtime_get_sync(mdev->dev);
-	if (ret < 0) {
-		pm_runtime_put_noidle(mdev->dev);
+	ret = pm_runtime_resume_and_get(mdev->dev);
+	if (ret < 0)
 		goto unregister;
-	}
 
 	/*
 	 * just print the raw revision register, the format is not
Signature · 1 line
2.25.1