[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <160703927312.3364.14275095458127731757.tip-bot2@tip-bot2>
Date: Thu, 03 Dec 2020 23:47:53 -0000
From: "tip-bot2 for Kefeng Wang" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Kefeng Wang <wangkefeng.wang@...wei.com>,
Daniel Lezcano <daniel.lezcano@...aro.org>, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject: [tip: timers/core] clocksource/drivers/sp804: Use clk_prepare_enable
and clk_disable_unprepare
The following commit has been merged into the timers/core branch of tip:
Commit-ID: 9d4965eb438f0c9f93e91ce6bfec72bbb8def988
Gitweb: https://git.kernel.org/tip/9d4965eb438f0c9f93e91ce6bfec72bbb8def988
Author: Kefeng Wang <wangkefeng.wang@...wei.com>
AuthorDate: Thu, 29 Oct 2020 20:33:15 +08:00
Committer: Daniel Lezcano <daniel.lezcano@...aro.org>
CommitterDate: Thu, 03 Dec 2020 19:16:17 +01:00
clocksource/drivers/sp804: Use clk_prepare_enable and clk_disable_unprepare
Directly use clk_prepare_enable and clk_disable_unprepare.
Signed-off-by: Kefeng Wang <wangkefeng.wang@...wei.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@...aro.org>
Link: https://lore.kernel.org/r/20201029123317.90286-3-wangkefeng.wang@huawei.com
---
drivers/clocksource/timer-sp804.c | 13 ++-----------
1 file changed, 2 insertions(+), 11 deletions(-)
diff --git a/drivers/clocksource/timer-sp804.c b/drivers/clocksource/timer-sp804.c
index 22a68cb..d74788b 100644
--- a/drivers/clocksource/timer-sp804.c
+++ b/drivers/clocksource/timer-sp804.c
@@ -68,17 +68,9 @@ static long __init sp804_get_clock_rate(struct clk *clk, const char *name)
return PTR_ERR(clk);
}
- err = clk_prepare(clk);
- if (err) {
- pr_err("sp804: clock failed to prepare: %d\n", err);
- clk_put(clk);
- return err;
- }
-
- err = clk_enable(clk);
+ err = clk_prepare_enable(clk);
if (err) {
pr_err("sp804: clock failed to enable: %d\n", err);
- clk_unprepare(clk);
clk_put(clk);
return err;
}
@@ -86,8 +78,7 @@ static long __init sp804_get_clock_rate(struct clk *clk, const char *name)
rate = clk_get_rate(clk);
if (rate < 0) {
pr_err("sp804: clock failed to get rate: %ld\n", rate);
- clk_disable(clk);
- clk_unprepare(clk);
+ clk_disable_unprepare(clk);
clk_put(clk);
}
Powered by blists - more mailing lists