Skip to content

Commit

Permalink
drivers: sh: resume enabled clocks fix
Browse files Browse the repository at this point in the history
Extend the SH / SH-Mobile ARM clock framework to only
resume clocks that have been enabled.

Without this fix divide-by-zero is triggering on sh7372
FSIDIV during system wide resume of Suspend-to-RAM.

Signed-off-by: Magnus Damm <damm@opensource.se>
Reviewed-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
  • Loading branch information
Magnus Damm authored and Paul Mundt committed Jun 14, 2011
1 parent dcee0bb commit 583af25
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/sh/clk/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ static void clks_core_resume(void)
struct clk *clkp;

list_for_each_entry(clkp, &clock_list, node) {
if (likely(clkp->ops)) {
if (likely(clkp->usecount && clkp->ops)) {
unsigned long rate = clkp->rate;

if (likely(clkp->ops->set_parent))
Expand Down

0 comments on commit 583af25

Please sign in to comment.