diff options
author | Minghao Chi <chi.minghao@zte.com.cn> | 2022-04-18 13:04:55 +0200 |
---|---|---|
committer | Stephen Boyd <sboyd@kernel.org> | 2022-04-23 04:03:00 +0200 |
commit | 3196a605659dcf7ea2a4442edf704aa0edc6e559 (patch) | |
tree | d77cdfcca02e8a9f39166a97ad9db783eb993d84 /drivers/clk/clk.c | |
parent | clk: actions: remove redundant assignment after a mask operation (diff) | |
download | linux-3196a605659dcf7ea2a4442edf704aa0edc6e559.tar.xz linux-3196a605659dcf7ea2a4442edf704aa0edc6e559.zip |
clk: using pm_runtime_resume_and_get instead of pm_runtime_get_sync
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>
Diffstat (limited to 'drivers/clk/clk.c')
-rw-r--r-- | drivers/clk/clk.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index ed119182aa1b..f00d4c1158d7 100644 --- 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) |