Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Linus Walleij and committed by
Russell King
2577cf24 871df85a

+2 -10
+2 -10
arch/arm/kernel/smp_twd.c
··· 248 248 return clk; 249 249 } 250 250 251 - err = clk_prepare(clk); 251 + err = clk_prepare_enable(clk); 252 252 if (err) { 253 - pr_err("smp_twd: clock failed to prepare: %d\n", err); 254 - clk_put(clk); 255 - return ERR_PTR(err); 256 - } 257 - 258 - err = clk_enable(clk); 259 - if (err) { 260 - pr_err("smp_twd: clock failed to enable: %d\n", err); 261 - clk_unprepare(clk); 253 + pr_err("smp_twd: clock failed to prepare+enable: %d\n", err); 262 254 clk_put(clk); 263 255 return ERR_PTR(err); 264 256 }