diff options
Diffstat (limited to 'arch/arm/mach-omap2/serial.c')
-rw-r--r-- | arch/arm/mach-omap2/serial.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c index 72df1b188135..2e17b57f5b23 100644 --- a/arch/arm/mach-omap2/serial.c +++ b/arch/arm/mach-omap2/serial.c | |||
@@ -533,7 +533,7 @@ static inline void omap_uart_idle_init(struct omap_uart_state *uart) {} | |||
533 | #define DEV_CREATE_FILE(dev, attr) | 533 | #define DEV_CREATE_FILE(dev, attr) |
534 | #endif /* CONFIG_PM */ | 534 | #endif /* CONFIG_PM */ |
535 | 535 | ||
536 | static struct omap_uart_state omap_uart[OMAP_MAX_NR_PORTS] = { | 536 | static struct omap_uart_state omap_uart[] = { |
537 | { | 537 | { |
538 | .pdev = { | 538 | .pdev = { |
539 | .name = "serial8250", | 539 | .name = "serial8250", |
@@ -583,7 +583,7 @@ void __init omap_serial_early_init(void) | |||
583 | * if not needed. | 583 | * if not needed. |
584 | */ | 584 | */ |
585 | 585 | ||
586 | for (i = 0; i < OMAP_MAX_NR_PORTS; i++) { | 586 | for (i = 0; i < ARRAY_SIZE(omap_uart); i++) { |
587 | struct omap_uart_state *uart = &omap_uart[i]; | 587 | struct omap_uart_state *uart = &omap_uart[i]; |
588 | struct platform_device *pdev = &uart->pdev; | 588 | struct platform_device *pdev = &uart->pdev; |
589 | struct device *dev = &pdev->dev; | 589 | struct device *dev = &pdev->dev; |
@@ -635,7 +635,7 @@ void __init omap_serial_init(void) | |||
635 | { | 635 | { |
636 | int i; | 636 | int i; |
637 | 637 | ||
638 | for (i = 0; i < OMAP_MAX_NR_PORTS; i++) { | 638 | for (i = 0; i < ARRAY_SIZE(omap_uart); i++) { |
639 | struct omap_uart_state *uart = &omap_uart[i]; | 639 | struct omap_uart_state *uart = &omap_uart[i]; |
640 | struct platform_device *pdev = &uart->pdev; | 640 | struct platform_device *pdev = &uart->pdev; |
641 | struct device *dev = &pdev->dev; | 641 | struct device *dev = &pdev->dev; |