public inbox for linux-sh@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drivers: sh: resume enabled clocks fix
@ 2011-06-13  4:42 Magnus Damm
  2011-06-13  8:52 ` Simon Horman
  0 siblings, 1 reply; 2+ messages in thread
From: Magnus Damm @ 2011-06-13  4:42 UTC (permalink / raw)
  To: linux-sh

From: Magnus Damm <damm@opensource.se>

Extend the SH / SH-Mobile ARM clock framework to only
resume clocks that has 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>
---

 This is a rewrite of the patch recently posted as:
 "[PATCH] ARM: mach-shmobile: sh7372 divide-by-zero FSIDIV fix"

 drivers/sh/clk/core.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- 0001/drivers/sh/clk/core.c
+++ work/drivers/sh/clk/core.c	2011-06-13 13:32:10.000000000 +0900
@@ -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))

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-06-13  8:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-13  4:42 [PATCH] drivers: sh: resume enabled clocks fix Magnus Damm
2011-06-13  8:52 ` Simon Horman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox