Skip to content

Commit

Permalink
SPEAr: Call clk_prepare() before calling clk_enable
Browse files Browse the repository at this point in the history
With common clock framework, it is must to call clk_{un}prepare() before/after
clk_{dis}enable. This patch fixes this for SPEAr timer.

Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Reviewed-by: Mike Turquette <mturquette@linaro.org>
  • Loading branch information
Viresh Kumar authored and Arnd Bergmann committed May 12, 2012
1 parent a45896b commit f8abc08
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions arch/arm/plat-spear/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,18 +219,18 @@ void __init spear_setup_timer(void)
goto err_iomap;
}

ret = clk_enable(gpt_clk);
ret = clk_prepare_enable(gpt_clk);
if (ret < 0) {
pr_err("%s:couldn't enable gpt clock\n", __func__);
goto err_clk;
pr_err("%s:couldn't prepare-enable gpt clock\n", __func__);
goto err_prepare_enable_clk;
}

spear_clockevent_init();
spear_clocksource_init();

return;

err_clk:
err_prepare_enable_clk:
clk_put(gpt_clk);
err_iomap:
iounmap(gpt_base);
Expand Down

0 comments on commit f8abc08

Please sign in to comment.