aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/serial.c
diff options
context:
space:
mode:
authorAlexander Shishkin <virtuoso@slind.org>2009-11-22 13:10:47 -0500
committerTony Lindgren <tony@atomide.com>2009-11-22 13:24:32 -0500
commit9d30b99f352a7f21f93f0f3e2f0eecf8aa7847c1 (patch)
treefc907e1e5a7a2f9edf9bf50b5c97cd4dd7018693 /arch/arm/mach-omap2/serial.c
parentf014ee320e8779c1798998f75bfc3cef2b46286f (diff)
omap: Eliminate OMAP_MAX_NR_PORTS
Eliminate OMAP_MAX_NR_PORTS Note that also the null terminator entry for omap1 serial_platform_data needs to be now removed to avoid oopsing. Note that mach-omap1 uses struct plat_serial8250_port array, which requires a null terminator at the end, and that's why we need to use ARRAY_SIZE - 1. This is not needed on mach-omap2 as the array used is struct omap_uart_state, and does not use a null terminator. Signed-off-by: Alexander Shishkin <virtuoso@slind.org> Acked-by: Kevin Hilman <khilman@deeprootsystems.com> Signed-off-by: Ladislav Michl <ladis@linux-mips.org> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/serial.c')
-rw-r--r--arch/arm/mach-omap2/serial.c6
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
536static struct omap_uart_state omap_uart[OMAP_MAX_NR_PORTS] = { 536static 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;