Skip to content

Commit

Permalink
sh: clkfwk: sh_clk_init_parent() should be called after clk_register()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Kuninori Morimoto authored and Paul Mundt committed Jan 10, 2012
1 parent 2dacb97 commit 7784f4d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/sh/clk/cpg.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 7784f4d

Please sign in to comment.