aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/sh
diff options
context:
space:
mode:
authorMagnus Damm <damm@opensource.se>2011-06-13 00:42:15 -0400
committerPaul Mundt <lethal@linux-sh.org>2011-06-14 02:15:25 -0400
commit583af252ab07cd1e8721878463da5b7016c18fdc (patch)
tree2203e7388bf7402264e4da8bee1e53ab8e24221f /drivers/sh
parentdcee0bb713d0ba0d32c5ce6fe0c5aa22e6fc274a (diff)
drivers: sh: resume enabled clocks fix
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>
Diffstat (limited to 'drivers/sh')
-rw-r--r--drivers/sh/clk/core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/sh/clk/core.c b/drivers/sh/clk/core.c
index 4f64183b27fa..7e9c39951ecb 100644
--- a/drivers/sh/clk/core.c
+++ b/drivers/sh/clk/core.c
@@ -635,7 +635,7 @@ static void clks_core_resume(void)
635 struct clk *clkp; 635 struct clk *clkp;
636 636
637 list_for_each_entry(clkp, &clock_list, node) { 637 list_for_each_entry(clkp, &clock_list, node) {
638 if (likely(clkp->ops)) { 638 if (likely(clkp->usecount && clkp->ops)) {
639 unsigned long rate = clkp->rate; 639 unsigned long rate = clkp->rate;
640 640
641 if (likely(clkp->ops->set_parent)) 641 if (likely(clkp->ops->set_parent))