Skip to content

Commit

Permalink
ARM: pxa: fix PGSR register address calculation
Browse files Browse the repository at this point in the history
The file mfp-pxa2xx.c defines a macro, PGSR(), which translates a gpio
bank number to a PGSR register address. The function pxa2xx_mfp_suspend()
erroneously passed in a gpio number instead of a gpio bank number.

Signed-off-by: Paul Parsons <lost.distance@yahoo.com>
Cc: stable@kernel.org
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
  • Loading branch information
Paul Parsons authored and Eric Miao committed Jul 6, 2011
1 parent fe0d422 commit beb0c9b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/arm/mach-pxa/mfp-pxa2xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -347,9 +347,9 @@ static int pxa2xx_mfp_suspend(void)
if ((gpio_desc[i].config & MFP_LPM_KEEP_OUTPUT) &&
(GPDR(i) & GPIO_bit(i))) {
if (GPLR(i) & GPIO_bit(i))
PGSR(i) |= GPIO_bit(i);
PGSR(gpio_to_bank(i)) |= GPIO_bit(i);
else
PGSR(i) &= ~GPIO_bit(i);
PGSR(gpio_to_bank(i)) &= ~GPIO_bit(i);
}
}

Expand Down

0 comments on commit beb0c9b

Please sign in to comment.