clk: using pm_runtime_resume_and_get instead of pm_runtime_get_sync
PATCH 1/1 clk: using pm_runtime_resume_and_get instead of pm_runtime_get_sync
From: Minghao Chi <[email protected]>
Using pm_runtime_resume_and_get is more appropriate for simplifing code
Reported-by Zeal Robot <[email protected]>
Signed-off-by Minghao Chi <[email protected]>
--- drivers/clk/clk.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
drivers/clk/clk.c +2 -6
@@ -113,12 +113,8 @@ static int clk_pm_runtime_get(struct clk_core *core)if (!core->rpm_enabled)return 0 ; - ret =pm_runtime_get_sync (core->dev); -if (ret <0 ) { -pm_runtime_put_noidle (core->dev); -return ret; - } -return 0 ; + ret =pm_runtime_resume_and_get (core->dev); +return ret; }static void clk_pm_runtime_put (struct clk_core *core)
Signature · 1 line
2.25.1
Stephen Boyd
maintainerQuoting [email protected] (2022-04-18 04:04:55)
Quoted 17 lines
From: Minghao Chi <[email protected]>
Using
pm_runtime_resume_and_getis more appropriate for simplifing codeReported-by Zeal Robot <[email protected]>Signed-off-by Minghao Chi <[email protected]>--- drivers/clk/clk.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)drivers/clk/clk.c +0
-0@@ -113,12 +113,8 @@ static int clk_pm_runtime_get(struct clk_core *core)if (!core->rpm_enabled)
drivers/clk/clk.c static int clk_pm_runtime_get(struct clk_core *core) · line 117
Quoted 10 lines
drivers/clk/clk.c +2
-6return 0 ; - ret =pm_runtime_get_sync (core->dev); -if (ret <0 ) { -pm_runtime_put_noidle (core->dev); -return ret; - } -return 0 ; + ret =pm_runtime_resume_and_get (core->dev); +return ret;
return pm_runtime_resume_and_get()
? I got it.
Quoting [email protected] (2022-04-18 04:04:55)
Quoted 8 lines
From: Minghao Chi <[email protected]>
Using
pm_runtime_resume_and_getis more appropriate for simplifing codeReported-by Zeal Robot <[email protected]>Signed-off-by Minghao Chi <[email protected]>---
Applied to clk-next