From: Paul Parsons Date: Sun, 8 May 2011 01:54:33 +0000 (+0000) Subject: ARM: pxa: fix PGSR register address calculation X-Git-Tag: v2.6.39.4~55 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=560a0d439f706e1239eeda9b6596d3646d87ae07;p=karo-tx-linux.git ARM: pxa: fix PGSR register address calculation commit beb0c9b056b1c23d2029b46a425362e9ccbeba01 upstream. 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 Signed-off-by: Eric Miao Signed-off-by: Greg Kroah-Hartman --- diff --git a/arch/arm/mach-pxa/mfp-pxa2xx.c b/arch/arm/mach-pxa/mfp-pxa2xx.c index 1d1419b73457..dfff1de92bf2 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(struct sys_device *d, pm_message_t state) 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); } }