From: "tip-bot2 for Kefeng Wang" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Kefeng Wang <wangkefeng.wang@huawei.com>,
Daniel Lezcano <daniel.lezcano@linaro.org>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: timers/core] clocksource/drivers/sp804: Use clk_prepare_enable and clk_disable_unprepare
Date: Thu, 03 Dec 2020 23:47:53 -0000 [thread overview]
Message-ID: <160703927312.3364.14275095458127731757.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20201029123317.90286-3-wangkefeng.wang@huawei.com>
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@huawei.com>
AuthorDate: Thu, 29 Oct 2020 20:33:15 +08:00
Committer: Daniel Lezcano <daniel.lezcano@linaro.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@huawei.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.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);
}
next prev parent reply other threads:[~2020-12-03 23:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-29 12:33 [PATCH 0/4] clocksource/drivers/sp804: misc cleanup Kefeng Wang
2020-10-29 12:33 ` [PATCH 1/4] clocksource/drivers/sp804: Make some symbol static Kefeng Wang
2020-12-03 23:47 ` [tip: timers/core] " tip-bot2 for Kefeng Wang
2020-10-29 12:33 ` [PATCH 2/4] clocksource/drivers/sp804: Use clk_prepare_enable and clk_disable_unprepare Kefeng Wang
2020-12-03 23:47 ` tip-bot2 for Kefeng Wang [this message]
2020-10-29 12:33 ` [PATCH 3/4] clocksource/drivers/sp804: Correct clk_get_rate handle Kefeng Wang
2020-12-03 23:47 ` [tip: timers/core] " tip-bot2 for Kefeng Wang
2020-10-29 12:33 ` [PATCH 4/4] clocksource/drivers/sp804: Use pr_fmt Kefeng Wang
2020-12-03 23:47 ` [tip: timers/core] " tip-bot2 for Kefeng Wang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=160703927312.3364.14275095458127731757.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=daniel.lezcano@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=wangkefeng.wang@huawei.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).