diff mbox series

hwspinlock: using pm_runtime_resume_and_get instead of pm_runtime_get_sync

Message ID 20220418105508.2558696-1-chi.minghao@zte.com.cn
State New
Headers show
Series hwspinlock: using pm_runtime_resume_and_get instead of pm_runtime_get_sync | expand

Commit Message

Lv Ruyi April 18, 2022, 10:55 a.m. UTC
From: Minghao Chi <chi.minghao@zte.com.cn>

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>
---
 drivers/hwspinlock/omap_hwspinlock.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

Comments

Bjorn Andersson April 23, 2022, 3:46 a.m. UTC | #1
On Mon, 18 Apr 2022 10:55:08 +0000, cgel.zte@gmail.com wrote:
> From: Minghao Chi <chi.minghao@zte.com.cn>
> 
> Using pm_runtime_resume_and_get is more appropriate
> for simplifing code
> 
> 

Applied, thanks!

[1/1] hwspinlock: using pm_runtime_resume_and_get instead of pm_runtime_get_sync
      commit: 0e01d176d5788f66dc64a7e61119edb56eb08339

Best regards,
diff mbox series

Patch

diff --git a/drivers/hwspinlock/omap_hwspinlock.c b/drivers/hwspinlock/omap_hwspinlock.c
index 33eeff94fc2a..1fb3a2550e29 100644
--- a/drivers/hwspinlock/omap_hwspinlock.c
+++ b/drivers/hwspinlock/omap_hwspinlock.c
@@ -94,11 +94,9 @@  static int omap_hwspinlock_probe(struct platform_device *pdev)
 	 * the module SYSSTATUS register
 	 */
 	pm_runtime_enable(&pdev->dev);
-	ret = pm_runtime_get_sync(&pdev->dev);
-	if (ret < 0) {
-		pm_runtime_put_noidle(&pdev->dev);
+	ret = pm_runtime_resume_and_get(&pdev->dev);
+	if (ret < 0)
 		goto runtime_err;
-	}
 
 	/* Determine number of locks */
 	i = readl(io_base + SYSSTATUS_OFFSET);