Commit 2577cf24 authored by Linus Walleij's avatar Linus Walleij Committed by Russell King

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: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 871df85a
...@@ -248,17 +248,9 @@ static struct clk *twd_get_clock(void) ...@@ -248,17 +248,9 @@ static struct clk *twd_get_clock(void)
return clk; return clk;
} }
err = clk_prepare(clk); err = clk_prepare_enable(clk);
if (err) { if (err) {
pr_err("smp_twd: clock failed to prepare: %d\n", err); pr_err("smp_twd: clock failed to prepare+enable: %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);
clk_put(clk); clk_put(clk);
return ERR_PTR(err); return ERR_PTR(err);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment