From 26aaa3df7e1fbd66c2935a4f4221dd5ab8834d7b Mon Sep 17 00:00:00 2001 From: Anand Gadiyar Date: Tue, 8 Apr 2008 17:37:59 +0530 Subject: [PATCH] ARM: OMAP: USB: Fix potential resource overlap due to incorrect end address The end address for the USB memory resources were incorrectly defined as ( + ) instead of ( + ) resulting in a potential overlap with the start address of other resources. Signed-off-by: Anand Gadiyar Acked-by: Nishant Kamat Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/board-2430sdp-usb.c | 2 +- arch/arm/mach-omap2/board-3430sdp-usb.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-omap2/board-2430sdp-usb.c b/arch/arm/mach-omap2/board-2430sdp-usb.c index 7f4e017f30e..cfbf73e0d34 100644 --- a/arch/arm/mach-omap2/board-2430sdp-usb.c +++ b/arch/arm/mach-omap2/board-2430sdp-usb.c @@ -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 */ diff --git a/arch/arm/mach-omap2/board-3430sdp-usb.c b/arch/arm/mach-omap2/board-3430sdp-usb.c index 81c9af7f9e0..048f01702bb 100644 --- a/arch/arm/mach-omap2/board-3430sdp-usb.c +++ b/arch/arm/mach-omap2/board-3430sdp-usb.c @@ -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 */ -- 2.41.1