Skip to content

Commit

Permalink
sh: clkfwk: Build fix for non-legacy CPG changes.
Browse files Browse the repository at this point in the history
The disabling of the init op for non-legacy clocks neglected to do the
same in the core clock framework, resulting in a build failure. Fix it
up.

Reported-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
  • Loading branch information
Paul Mundt committed Nov 19, 2010
1 parent 549015c commit f278ea8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions drivers/sh/clk/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -418,8 +418,11 @@ int clk_register(struct clk *clk)
list_add(&clk->sibling, &root_clks);

list_add(&clk->node, &clock_list);

#ifdef CONFIG_SH_CLK_CPG_LEGACY
if (clk->ops && clk->ops->init)
clk->ops->init(clk);
#endif

out_unlock:
mutex_unlock(&clock_list_sem);
Expand Down
2 changes: 1 addition & 1 deletion drivers/sh/clk/cpg.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ static int sh_clk_div6_enable(struct clk *clk)
unsigned long value;
int ret;

ret = sh_clk_div6_set_rate(clk, clk->rate, 0);
ret = sh_clk_div6_set_rate(clk, clk->rate);
if (ret == 0) {
value = __raw_readl(clk->enable_reg);
value &= ~0x100; /* clear stop bit to enable clock */
Expand Down

0 comments on commit f278ea8

Please sign in to comment.