From: Lennert Buytenhek Date: Mon, 18 Dec 2006 00:02:24 +0000 (+0100) Subject: [ARM] 4056/1: iop13xx: fix resource.end off-by-one in flash setup X-Git-Tag: v2.6.20-rc2~87^2~7 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ab9d90db956dec1a83f4c4ef443df6bdbfc3f25d;p=linux-2.6 [ARM] 4056/1: iop13xx: fix resource.end off-by-one in flash setup The struct resource 'end' field is inclusive, the iop13xx flash setup code got this wrong. Signed-off-by: Lennert Buytenhek Signed-off-by: Russell King --- diff --git a/arch/arm/mach-iop13xx/setup.c b/arch/arm/mach-iop13xx/setup.c index 3756d2ccb1..5fbeb28d04 100644 --- a/arch/arm/mach-iop13xx/setup.c +++ b/arch/arm/mach-iop13xx/setup.c @@ -337,7 +337,7 @@ void __init iop13xx_platform_init(void) #ifdef CONFIG_MTD_PHYSMAP iq8134x_flash_resource.end = iq8134x_flash_resource.start + - iq8134x_probe_flash_size(); + iq8134x_probe_flash_size() - 1; if (iq8134x_flash_resource.end > iq8134x_flash_resource.start) iop13xx_devices[plat_idx++] = &iq8134x_flash; else