projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bab7950
)
clk: using pm_runtime_resume_and_get instead of pm_runtime_get_sync
author
Minghao Chi
<chi.minghao@zte.com.cn>
Mon, 18 Apr 2022 11:04:55 +0000
(11:04 +0000)
committer
Stephen Boyd
<sboyd@kernel.org>
Sat, 23 Apr 2022 02:03:00 +0000
(19:03 -0700)
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>
Link:
https://lore.kernel.org/r/20220418110455.2559264-1-chi.minghao@zte.com.cn
[sboyd@kernel.org: Drop local ret variable too]
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/clk.c
patch
|
blob
|
history
diff --git
a/drivers/clk/clk.c
b/drivers/clk/clk.c
index ed119182aa1bebb509c28b9b6c7abb25045d7909..f00d4c1158d7202cdb4c037b2109861b0b0c7d84 100644
(file)
--- a/
drivers/clk/clk.c
+++ b/
drivers/clk/clk.c
@@
-108,17
+108,10
@@
struct clk {
/*** runtime pm ***/
static int clk_pm_runtime_get(struct clk_core *core)
{
- int ret;
-
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;
+ return pm_runtime_resume_and_get(core->dev);
}
static void clk_pm_runtime_put(struct clk_core *core)