[MTD] Fix off-by-one error in physmap.c
authorSascha Hauer <s.hauer@pengutronix.de>
Tue, 27 Jun 2006 13:38:15 +0000 (14:38 +0100)
committerDavid Woodhouse <dwmw2@infradead.org>
Tue, 27 Jun 2006 13:38:15 +0000 (14:38 +0100)
This patch fixes a simple off-by-one error in the mtd physmap driver.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
drivers/mtd/maps/physmap.c

index 433c3cac3ca959285e0cd87e33829e2540c53acc..d6301f08906dffd0b769643a55a3281b13f2dcb6 100644 (file)
@@ -182,7 +182,7 @@ static struct physmap_flash_data physmap_flash_data = {
 
 static struct resource physmap_flash_resource = {
        .start          = CONFIG_MTD_PHYSMAP_START,
-       .end            = CONFIG_MTD_PHYSMAP_START + CONFIG_MTD_PHYSMAP_LEN,
+       .end            = CONFIG_MTD_PHYSMAP_START + CONFIG_MTD_PHYSMAP_LEN - 1,
        .flags          = IORESOURCE_MEM,
 };