summaryrefslogtreecommitdiff
path: root/arch/arm/kernel/smp_twd.c
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2012-10-22 10:18:06 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2012-11-04 10:31:01 +0000
commit2577cf246233b1e4e38576f28a5ec05c9c6a6c2a (patch)
tree30415d695eb6430529717167d1f6c2762bd6f12c /arch/arm/kernel/smp_twd.c
parent871df85a592396b36d4c40b3860e8d7373626552 (diff)
ARM: 7561/1: SMP_TWD: use clk_prepare_enable()
A minor code refactoring saving a few lines by merging prepare() and enable() calls. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/kernel/smp_twd.c')
-rw-r--r--arch/arm/kernel/smp_twd.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/arch/arm/kernel/smp_twd.c b/arch/arm/kernel/smp_twd.c
index e1f906989bb8..780b05706364 100644
--- a/arch/arm/kernel/smp_twd.c
+++ b/arch/arm/kernel/smp_twd.c
@@ -248,17 +248,9 @@ static struct clk *twd_get_clock(void)
return clk;
}
- err = clk_prepare(clk);
+ err = clk_prepare_enable(clk);
if (err) {
- pr_err("smp_twd: clock failed to prepare: %d\n", err);
- clk_put(clk);
- return ERR_PTR(err);
- }
-
- err = clk_enable(clk);
- if (err) {
- pr_err("smp_twd: clock failed to enable: %d\n", err);
- clk_unprepare(clk);
+ pr_err("smp_twd: clock failed to prepare+enable: %d\n", err);
clk_put(clk);
return ERR_PTR(err);
}