]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
ARM: OMAP: USB: Fix potential resource overlap due to incorrect end address
authorAnand Gadiyar <gadiyar@ti.com>
Tue, 8 Apr 2008 12:07:59 +0000 (17:37 +0530)
committerTony Lindgren <tony@atomide.com>
Fri, 11 Apr 2008 19:36:21 +0000 (12:36 -0700)
The end address for the USB memory resources were incorrectly defined as
(<start> + <size>) instead of (<start> + <size - 1>) resulting in a
potential overlap with the start address of other resources.

Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
Acked-by: Nishant Kamat <nskamat@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap2/board-2430sdp-usb.c
arch/arm/mach-omap2/board-3430sdp-usb.c

index 7f4e017f30edb8fd0580c0f634e6371691a5a9f3..cfbf73e0d34df91a365672482e37b856f1393259 100644 (file)
@@ -23,7 +23,7 @@
 static struct resource musb_resources[] = {
        [0] = {
                .start  = OMAP243X_HS_BASE,
-               .end    = OMAP243X_HS_BASE + SZ_8K,
+               .end    = OMAP243X_HS_BASE + SZ_8K - 1,
                .flags  = IORESOURCE_MEM,
        },
        [1] = { /* general IRQ */
index 81c9af7f9e00ac8d1926c5955ab790d8ca878e6a..048f01702bb9ff3aae95618e44ad66f99aefc098 100644 (file)
@@ -29,7 +29,7 @@
 static struct resource musb_resources[] = {
        [0] = {
                .start  = OMAP34XX_HSUSB_OTG_BASE,
-               .end    = OMAP34XX_HSUSB_OTG_BASE + SZ_8K,
+               .end    = OMAP34XX_HSUSB_OTG_BASE + SZ_8K - 1,
                .flags  = IORESOURCE_MEM,
        },
        [1] = { /* general IRQ */
@@ -100,7 +100,7 @@ static struct platform_device musb_device = {
 static struct resource ehci_resources[] = {
        [0] = {
                .start   = OMAP34XX_HSUSB_HOST_BASE + 0x800,
-               .end     = OMAP34XX_HSUSB_HOST_BASE + 0x800 + SZ_1K,
+               .end     = OMAP34XX_HSUSB_HOST_BASE + 0x800 + SZ_1K - 1,
                .flags   = IORESOURCE_MEM,
        },
        [1] = {         /* general IRQ */