[PATCH v2] Fix one-too-much bug when building list of regs to be preserved on PM
Christian Pellegrin
chripell at fsfe.org
Fri Mar 12 02:29:03 EST 2010
gpio_nr is already incremented in the for loop, so if we will have 32
banks of GPIOs someday the 33rd won't be saved/restored during PM
Signed-off-by: Christian Pellegrin <chripell at fsfe.org>
---
arch/arm/plat-s3c/pm-gpio.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/plat-s3c/pm-gpio.c b/arch/arm/plat-s3c/pm-gpio.c
index cfd326a..b3cc8db 100644
--- a/arch/arm/plat-s3c/pm-gpio.c
+++ b/arch/arm/plat-s3c/pm-gpio.c
@@ -343,7 +343,7 @@ void s3c_pm_save_gpios(void)
ourchip->pm_save[2],
ourchip->pm_save[3]);
- gpio_nr += ourchip->chip.ngpio;
+ gpio_nr += ourchip->chip.ngpio - 1;
gpio_nr += CONFIG_S3C_GPIO_SPACE;
}
}
@@ -374,7 +374,7 @@ void s3c_pm_restore_gpios(void)
s3c_pm_resume_gpio(ourchip);
- gpio_nr += ourchip->chip.ngpio;
+ gpio_nr += ourchip->chip.ngpio - 1;
gpio_nr += CONFIG_S3C_GPIO_SPACE;
}
}
--
1.5.6.5
More information about the linux-arm-kernel
mailing list