]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
[ARM] 4056/1: iop13xx: fix resource.end off-by-one in flash setup
authorLennert Buytenhek <buytenh@wantstofly.org>
Mon, 18 Dec 2006 00:02:24 +0000 (01:02 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Mon, 18 Dec 2006 00:14:58 +0000 (00:14 +0000)
The struct resource 'end' field is inclusive, the iop13xx flash
setup code got this wrong.

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mach-iop13xx/setup.c

index 3756d2ccb1a7dfc70044435f8a2394b00bf19a11..5fbeb28d04bb6bcf67ceb976e3d2fae931f6b036 100644 (file)
@@ -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