diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-09-22 06:38:40 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-09-27 04:25:53 -0400 |
commit | 6f5ad96301d4b897f09a893d331a0b18b3fff6b1 (patch) | |
tree | e7974d7e965ffbf6037970054bc52c14e3ad70e8 /arch/arm/common | |
parent | 72ae00c970cf1e6027c5b719f42e7eff0aa1c1d9 (diff) |
clk: timer-sp: convert to clk_prepare()/clk_unprepare()
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/common')
-rw-r--r-- | arch/arm/common/timer-sp.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/arm/common/timer-sp.c b/arch/arm/common/timer-sp.c index 41df47875122..2393b5bc96fa 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) | |||
41 | return PTR_ERR(clk); | 41 | return PTR_ERR(clk); |
42 | } | 42 | } |
43 | 43 | ||
44 | err = clk_prepare(clk); | ||
45 | if (err) { | ||
46 | pr_err("sp804: %s clock failed to prepare: %d\n", name, err); | ||
47 | clk_put(clk); | ||
48 | return err; | ||
49 | } | ||
50 | |||
44 | err = clk_enable(clk); | 51 | err = clk_enable(clk); |
45 | if (err) { | 52 | if (err) { |
46 | pr_err("sp804: %s clock failed to enable: %d\n", name, err); | 53 | pr_err("sp804: %s clock failed to enable: %d\n", name, err); |
54 | clk_unprepare(clk); | ||
47 | clk_put(clk); | 55 | clk_put(clk); |
48 | return err; | 56 | return err; |
49 | } | 57 | } |
@@ -52,6 +60,7 @@ static long __init sp804_get_clock_rate(const char *name) | |||
52 | if (rate < 0) { | 60 | if (rate < 0) { |
53 | pr_err("sp804: %s clock failed to get rate: %ld\n", name, rate); | 61 | pr_err("sp804: %s clock failed to get rate: %ld\n", name, rate); |
54 | clk_disable(clk); | 62 | clk_disable(clk); |
63 | clk_unprepare(clk); | ||
55 | clk_put(clk); | 64 | clk_put(clk); |
56 | } | 65 | } |
57 | 66 | ||