Skip to content

Commit

Permalink
ARM: SAMSUNG: fix suspend/resume on if some GPIO banks not present
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Pinkava J authored and Ben Dooks committed May 23, 2010
1 parent fda2257 commit 91dc74e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions arch/arm/plat-samsung/pm-gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit 91dc74e

Please sign in to comment.