]> git.baikalelectronics.ru Git - kernel.git/commitdiff
clk: sunxi: Remove calls to clk_put
authorMaxime Ripard <maxime.ripard@free-electrons.com>
Sat, 10 May 2014 03:33:36 +0000 (22:33 -0500)
committerMaxime Ripard <maxime.ripard@free-electrons.com>
Wed, 11 Jun 2014 07:58:44 +0000 (09:58 +0200)
Callers of clk_put must disable the clock first. This also means that
as long as the clock is enabled the driver should hold a reference to
that clock. Hence, the call to clk_put here are bogus and should be
removed.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: Mike Turquette <mturquette@linaro.org>
Signed-off-by: Emilio López <emilio@elopez.com.ar>
drivers/clk/sunxi/clk-sunxi.c

index bf5075e4b20ff5e81f8db306a16cbc7d9a4722d4..9bfa21ac04f49d9ce842d10c9f37393933a369aa 100644 (file)
@@ -1339,17 +1339,13 @@ static void __init sunxi_clock_protect(void)
 
        /* memory bus clock - sun5i+ */
        clk = clk_get(NULL, "mbus");
-       if (!IS_ERR(clk)) {
+       if (!IS_ERR(clk))
                clk_prepare_enable(clk);
-               clk_put(clk);
-       }
 
        /* DDR clock - sun4i+ */
        clk = clk_get(NULL, "pll5_ddr");
-       if (!IS_ERR(clk)) {
+       if (!IS_ERR(clk))
                clk_prepare_enable(clk);
-               clk_put(clk);
-       }
 }
 
 static void __init sunxi_init_clocks(struct device_node *np)