[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20220420090320.2588742-1-chi.minghao@zte.com.cn>
Date: Wed, 20 Apr 2022 09:03:20 +0000
From: cgel.zte@...il.com
To: b-liu@...com
Cc: gregkh@...uxfoundation.org, linux-usb@...r.kernel.org,
linux-kernel@...r.kernel.org, Minghao Chi <chi.minghao@....com.cn>,
Zeal Robot <zealci@....com.cn>
Subject: [PATCH] usb: musb: using pm_runtime_resume_and_get instead of pm_runtime_get_sync
From: Minghao Chi <chi.minghao@....com.cn>
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 <zealci@....com.cn>
Signed-off-by: Minghao Chi <chi.minghao@....com.cn>
---
drivers/usb/musb/musb_core.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index f7b1d5993f8c..6f7b37f5fccc 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -2828,11 +2828,9 @@ static int musb_suspend(struct device *dev)
unsigned long flags;
int ret;
- ret = pm_runtime_get_sync(dev);
- if (ret < 0) {
- pm_runtime_put_noidle(dev);
+ ret = pm_runtime_resume_and_get(dev);
+ if (ret < 0)
return ret;
- }
musb_platform_disable(musb);
musb_disable_interrupts(musb);
--
2.25.1
Powered by blists - more mailing lists