Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit beb0c9b0 authored by Paul Parsons's avatar Paul Parsons Committed by Eric Miao
Browse files

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: default avatarPaul Parsons <lost.distance@yahoo.com>
Cc: stable@kernel.org
Signed-off-by: default avatarEric Miao <eric.y.miao@gmail.com>
parent fe0d4220
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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);
		}
	}