]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
sh: clkfwk: sh_clk_init_parent() should be called after clk_register()
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Mon, 12 Dec 2011 03:02:09 +0000 (19:02 -0800)
committerPaul Mundt <lethal@linux-sh.org>
Tue, 10 Jan 2012 04:30:30 +0000 (13:30 +0900)
sh_clk_init_parent() are using clk->mapped_reg
which is mapped in clk_register()

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 a0d8faa40baa87abb07793046c028bddf2c5570a..45fee368b0925bec46312dbbe7569c8b5ca2dfc2 100644 (file)
@@ -222,11 +222,11 @@ static int __init sh_clk_div6_register_ops(struct clk *clks, int nr,
                clkp->ops = ops;
                clkp->freq_table = freq_table + (k * freq_table_size);
                clkp->freq_table[nr_divs].frequency = CPUFREQ_TABLE_END;
-               ret = sh_clk_init_parent(clkp);
+               ret = clk_register(clkp);
                if (ret < 0)
                        break;
 
-               ret = clk_register(clkp);
+               ret = sh_clk_init_parent(clkp);
        }
 
        return ret;