summaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-samsung
diff options
context:
space:
mode:
authorPinkava J <Jiri.Pinkava@vscht.cz>2010-05-23 06:42:26 +0200
committerBen Dooks <ben-linux@fluff.org>2010-05-23 16:26:04 +0100
commit91dc74e479e1ea0bb8864694303e6fe5612b707c (patch)
tree55a08b31f1c11c306dbd42936989342751c76535 /arch/arm/plat-samsung
parentfda225774ed0f3742eb2337680e5221dfa49dad8 (diff)
downloadblackbird-op-linux-91dc74e479e1ea0bb8864694303e6fe5612b707c.tar.gz
blackbird-op-linux-91dc74e479e1ea0bb8864694303e6fe5612b707c.zip
ARM: SAMSUNG: fix suspend/resume on if some GPIO banks not present
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> [ben-linux@fluff.org: shorten subject] Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'arch/arm/plat-samsung')
-rw-r--r--arch/arm/plat-samsung/pm-gpio.c8
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 d50ab9d2af53..7df03f87fbfa 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);
OpenPOWER on IntegriCloud