sh: clkfwk: bugfix: use clk_reparent() for div6 clocks
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Thu, 19 Jan 2012 09:00:40 +0000 (01:00 -0800)
committerPaul Mundt <lethal@linux-sh.org>
Tue, 24 Jan 2012 01:44:49 +0000 (10:44 +0900)
Various problems will happen if clk parent was set up directly.
it should use clk_reparent()

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
drivers/sh/clk/cpg.c

index 45fee36..92d314a 100644 (file)
@@ -190,7 +190,7 @@ static int __init sh_clk_init_parent(struct clk *clk)
                return -EINVAL;
        }
 
-       clk->parent = clk->parent_table[val];
+       clk_reparent(clk, clk->parent_table[val]);
        if (!clk->parent) {
                pr_err("sh_clk_init_parent: unable to set parent");
                return -EINVAL;