diff mbox

[APPLIED,RFC] OMAP: eliminate OMAP_MAX_NR_PORTS

Message ID 20091020233115.GA7363@localhost.localdomain (mailing list archive)
State Awaiting Upstream, archived
Delegated to: Tony Lindgren
Headers show

Commit Message

Ladislav.Michl@seznam.cz Oct. 20, 2009, 11:53 p.m. UTC
None
diff mbox

Patch

diff --git a/arch/arm/mach-omap1/serial.c b/arch/arm/mach-omap1/serial.c
index 9c59332..0392ff5 100644
--- a/arch/arm/mach-omap1/serial.c
+++ b/arch/arm/mach-omap1/serial.c
@@ -86,7 +86,9 @@  static struct plat_serial8250_port serial_platform_data[] = {
 		.iotype		= UPIO_MEM,
 		.regshift	= 2,
 		.uartclk	= OMAP16XX_BASE_BAUD * 16,
-	},
+	}, {
+	}
+
 };
 
 static struct platform_device serial_device = {
@@ -119,7 +121,7 @@  void __init omap_serial_init(void)
 		serial_platform_data[2].uartclk = OMAP1510_BASE_BAUD * 16;
 	}
 
-	for (i = 0; i < ARRAY_SIZE(serial_platform_data); i++) {
+	for (i = 0; i < ARRAY_SIZE(serial_platform_data) - 1; i++) {
 		unsigned char reg;
 
 		/* Static mapping, never released */
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index dabc089..ca69ffa 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -585,7 +585,7 @@  void __init omap_serial_early_init(void)
 	 * if not needed.
 	 */
 
-	for (i = 0; i < ARRAY_SIZE(omap_uart); i++) {
+	for (i = 0; i < ARRAY_SIZE(omap_uart) - 1; i++) {
 		struct omap_uart_state *uart = &omap_uart[i];
 		struct platform_device *pdev = &uart->pdev;
 		struct device *dev = &pdev->dev;
@@ -637,7 +637,7 @@  void __init omap_serial_init(void)
 {
 	int i;
 
-	for (i = 0; i < ARRAY_SIZE(omap_uart); i++) {
+	for (i = 0; i < ARRAY_SIZE(omap_uart) - 1; i++) {
 		struct omap_uart_state *uart = &omap_uart[i];
 		struct platform_device *pdev = &uart->pdev;
 		struct device *dev = &pdev->dev;