From 583af252ab07cd1e8721878463da5b7016c18fdc Mon Sep 17 00:00:00 2001 From: Magnus Damm Date: Mon, 13 Jun 2011 04:42:15 +0000 Subject: 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 Reviewed-by: Simon Horman Signed-off-by: Paul Mundt --- drivers/sh/clk/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/sh/clk') 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) 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)) -- cgit v1.2.3-58-ga151