From: Linus Walleij Date: Mon, 22 Oct 2012 09:18:06 +0000 (+0100) Subject: ARM: 7561/1: SMP_TWD: use clk_prepare_enable() X-Git-Url: http://git.mmlx.us/?a=commitdiff_plain;h=2577cf246233b1e4e38576f28a5ec05c9c6a6c2a;p=linux-edison.git 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 Signed-off-by: Russell King --- diff --git a/arch/arm/kernel/smp_twd.c b/arch/arm/kernel/smp_twd.c index e1f906989bb..780b0570636 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); }