public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARM: OMAP: USB: Fix potential resource overlap due to incorrect end address
@ 2008-04-08 12:07 Gadiyar, Anand
  2008-04-11 19:32 ` Tony Lindgren
  0 siblings, 1 reply; 2+ messages in thread
From: Gadiyar, Anand @ 2008-04-08 12:07 UTC (permalink / raw)
  To: linux-omap

From: Anand Gadiyar <gadiyar@ti.com>

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>
---
 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(-)

Index: linux-omap-2.6/arch/arm/mach-omap2/board-2430sdp-usb.c
===================================================================
--- linux-omap-2.6.orig/arch/arm/mach-omap2/board-2430sdp-usb.c	2008-04-08 17:28:40.000000000 +0530
+++ linux-omap-2.6/arch/arm/mach-omap2/board-2430sdp-usb.c	2008-04-08 17:29:54.868278300 +0530
@@ -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: linux-omap-2.6/arch/arm/mach-omap2/board-3430sdp-usb.c
===================================================================
--- linux-omap-2.6.orig/arch/arm/mach-omap2/board-3430sdp-usb.c	2008-04-08 17:28:40.000000000 +0530
+++ linux-omap-2.6/arch/arm/mach-omap2/board-3430sdp-usb.c	2008-04-08 17:30:21.938407487 +0530
@@ -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_devic
 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 */

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-04-11 19:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-08 12:07 [PATCH] ARM: OMAP: USB: Fix potential resource overlap due to incorrect end address Gadiyar, Anand
2008-04-11 19:32 ` Tony Lindgren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox