提交 6f5ad963 编写于 作者: R Russell King

clk: timer-sp: convert to clk_prepare()/clk_unprepare()

Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
上级 72ae00c9
......@@ -41,9 +41,17 @@ static long __init sp804_get_clock_rate(const char *name)
return PTR_ERR(clk);
}
err = clk_prepare(clk);
if (err) {
pr_err("sp804: %s clock failed to prepare: %d\n", name, err);
clk_put(clk);
return err;
}
err = clk_enable(clk);
if (err) {
pr_err("sp804: %s clock failed to enable: %d\n", name, err);
clk_unprepare(clk);
clk_put(clk);
return err;
}
......@@ -52,6 +60,7 @@ static long __init sp804_get_clock_rate(const char *name)
if (rate < 0) {
pr_err("sp804: %s clock failed to get rate: %ld\n", name, rate);
clk_disable(clk);
clk_unprepare(clk);
clk_put(clk);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册