Skip to content

Commit

Permalink
ARM: SAMSUNG: Fix additional increment when running through gpios
Browse files Browse the repository at this point in the history
The pm-gpio.c code was incrementing the gpio_nr from the nr_gpios
field and the bank-bank offset inside the loop, and also in the
for() loop with a ++.

Remove the ++, as the number is already at the next GPIO, thus
ensuring that we don't skip a gpio bank by accident.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
  • Loading branch information
Ben Dooks committed May 18, 2010
1 parent 4ac2a39 commit 32b6cb3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/arm/plat-samsung/pm-gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ void s3c_pm_save_gpios(void)
struct s3c_gpio_chip *ourchip;
unsigned int gpio_nr;

for (gpio_nr = 0; gpio_nr < S3C_GPIO_END; gpio_nr++) {
for (gpio_nr = 0; gpio_nr < S3C_GPIO_END;) {
ourchip = s3c_gpiolib_getchip(gpio_nr);
if (!ourchip)
continue;
Expand Down Expand Up @@ -367,7 +367,7 @@ void s3c_pm_restore_gpios(void)
struct s3c_gpio_chip *ourchip;
unsigned int gpio_nr;

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

0 comments on commit 32b6cb3

Please sign in to comment.