linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] s3c24xx fix: freeze during suspend/resume on s3c24xx if some GPIO banks not present
@ 2010-05-23  4:42 Pinkava J.
  2010-05-23  9:19 ` Sergei Shtylyov
  2010-05-23 13:18 ` Pinkava J.
  0 siblings, 2 replies; 6+ messages in thread
From: Pinkava J. @ 2010-05-23  4:42 UTC (permalink / raw)
  To: linux-arm-kernel

When saving GPIOs during suspend/resume we need skip missing GPIO banks, not
trying get corresponding chip again and again in infinite loop.

Signed-off-by: Jiri Pinkava <jiri.pinkava@vscht.cz>
---
 arch/arm/plat-samsung/pm-gpio.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/arch/arm/plat-samsung/pm-gpio.c b/arch/arm/plat-samsung/pm-gpio.c
index d50ab9d..7df03f8 100644
--- a/arch/arm/plat-samsung/pm-gpio.c
+++ b/arch/arm/plat-samsung/pm-gpio.c
@@ -331,8 +331,10 @@ void s3c_pm_save_gpios(void)

 	for (gpio_nr = 0; gpio_nr < S3C_GPIO_END;) {
 		ourchip = s3c_gpiolib_getchip(gpio_nr);
-		if (!ourchip)
+		if (!ourchip) {
+			gpio_nr++;
 			continue;
+		}

 		s3c_pm_save_gpio(ourchip);

@@ -369,8 +371,10 @@ void s3c_pm_restore_gpios(void)

 	for (gpio_nr = 0; gpio_nr < S3C_GPIO_END;) {
 		ourchip = s3c_gpiolib_getchip(gpio_nr);
-		if (!ourchip)
+		if (!ourchip) {
+			gpio_nr++;
 			continue;
+		}

 		s3c_pm_resume_gpio(ourchip);

-- 
1.7.1

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

end of thread, other threads:[~2010-05-24  7:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-23  4:42 [PATCH] s3c24xx fix: freeze during suspend/resume on s3c24xx if some GPIO banks not present Pinkava J.
2010-05-23  9:19 ` Sergei Shtylyov
2010-05-23 12:34   ` Pinkava J.
2010-05-24  7:57     ` Sergei Shtylyov
2010-05-24  3:32   ` Ben Dooks
2010-05-23 13:18 ` Pinkava J.

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).