linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] pxa: Fix PGSR register address calculation
@ 2011-05-08  1:54 Paul Parsons
  2011-05-09  3:48 ` Eric Miao
  0 siblings, 1 reply; 2+ messages in thread
From: Paul Parsons @ 2011-05-08  1:54 UTC (permalink / raw)
  To: linux-arm-kernel

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>
---
--- clean-2.6.39-rc6/arch/arm/mach-pxa/mfp-pxa2xx.c	2011-03-15 01:20:32.000000000 +0000
+++ linux-2.6.39-rc6/arch/arm/mach-pxa/mfp-pxa2xx.c	2011-05-08 02:09:36.706294235 +0100
@@ -347,9 +347,9 @@ static int pxa2xx_mfp_suspend(struct sys
 		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);
 		}
 	}
 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-05-09  3:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-08  1:54 [PATCH] pxa: Fix PGSR register address calculation Paul Parsons
2011-05-09  3:48 ` Eric Miao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).