summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorPaul Parsons <lost.distance@yahoo.com>2011-05-08 01:54:33 +0000
committerEric Miao <eric.y.miao@gmail.com>2011-07-06 23:47:40 +0800
commitbeb0c9b056b1c23d2029b46a425362e9ccbeba01 (patch)
treea42fcfc2b61c3331659eaab94a26944eb8def380 /arch
parentfe0d42203cb5616eeff68b14576a0f7e2dd56625 (diff)
downloadblackbird-op-linux-beb0c9b056b1c23d2029b46a425362e9ccbeba01.tar.gz
blackbird-op-linux-beb0c9b056b1c23d2029b46a425362e9ccbeba01.zip
ARM: pxa: fix PGSR register address calculation
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>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-pxa/mfp-pxa2xx.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/mach-pxa/mfp-pxa2xx.c b/arch/arm/mach-pxa/mfp-pxa2xx.c
index 87ae3129f4f7..b27544bcafcb 100644
--- a/arch/arm/mach-pxa/mfp-pxa2xx.c
+++ b/arch/arm/mach-pxa/mfp-pxa2xx.c
@@ -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);
}
}
OpenPOWER on IntegriCloud