SPEAr: Call clk_prepare() before calling clk_enable
authorViresh Kumar <viresh.kumar@st.com>
Mon, 16 Apr 2012 08:26:18 +0000 (13:56 +0530)
committerArnd Bergmann <arnd@arndb.de>
Sat, 12 May 2012 19:19:28 +0000 (21:19 +0200)
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>
arch/arm/plat-spear/time.c

index abb5bdecd509acbe13f0b70c78b65a2607becd1d..1c94989d725f8e3f641598b5107176fb5878adfd 100644 (file)
@@ -219,10 +219,10 @@ 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();
@@ -230,7 +230,7 @@ void __init spear_setup_timer(void)
 
        return;
 
-err_clk:
+err_prepare_enable_clk:
        clk_put(gpt_clk);
 err_iomap:
        iounmap(gpt_base);