@@ -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 */
@@ -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;