diff --git a/arch/arm/mach-pxa/magician.c b/arch/arm/mach-pxa/magician.c
index af464870c129b4d77010ef7511331cc3e746e691..7fd31235c26e131efb3a4629aebc8b4c0e853938 100644
--- a/arch/arm/mach-pxa/magician.c
+++ b/arch/arm/mach-pxa/magician.c
@@ -204,7 +204,7 @@ static struct platform_device gpio_keys = {
 static struct resource egpio_resources[] = {
 	[0] = {
 		.start = PXA_CS3_PHYS,
-		.end   = PXA_CS3_PHYS + 0x20,
+		.end   = PXA_CS3_PHYS + 0x20 - 1,
 		.flags = IORESOURCE_MEM,
 	},
 	[1] = {