summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2011-09-22 11:38:40 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2011-09-27 09:25:53 +0100
commit6f5ad96301d4b897f09a893d331a0b18b3fff6b1 (patch)
treee7974d7e965ffbf6037970054bc52c14e3ad70e8 /arch
parent72ae00c970cf1e6027c5b719f42e7eff0aa1c1d9 (diff)
downloadop-kernel-dev-6f5ad96301d4b897f09a893d331a0b18b3fff6b1.zip
op-kernel-dev-6f5ad96301d4b897f09a893d331a0b18b3fff6b1.tar.gz
clk: timer-sp: convert to clk_prepare()/clk_unprepare()
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/common/timer-sp.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/arm/common/timer-sp.c b/arch/arm/common/timer-sp.c
index 41df478..2393b5b 100644
--- a/arch/arm/common/timer-sp.c
+++ b/arch/arm/common/timer-sp.c
@@ -41,9 +41,17 @@ static long __init sp804_get_clock_rate(const char *name)
return PTR_ERR(clk);
}
+ err = clk_prepare(clk);
+ if (err) {
+ pr_err("sp804: %s clock failed to prepare: %d\n", name, err);
+ clk_put(clk);
+ return err;
+ }
+
err = clk_enable(clk);
if (err) {
pr_err("sp804: %s clock failed to enable: %d\n", name, err);
+ clk_unprepare(clk);
clk_put(clk);
return err;
}
@@ -52,6 +60,7 @@ static long __init sp804_get_clock_rate(const char *name)
if (rate < 0) {
pr_err("sp804: %s clock failed to get rate: %ld\n", name, rate);
clk_disable(clk);
+ clk_unprepare(clk);
clk_put(clk);
}
OpenPOWER on IntegriCloud