From 034af96b57df450eb6a8acab04e9850878167a7f Mon Sep 17 00:00:00 2001 From: Karthik Manamcheri Date: Thu, 28 Mar 2013 17:33:20 -0500 Subject: [PATCH] --- yaml --- r: 364287 b: refs/heads/master c: cfcec52e9781f08948c6eb98198d65c45be75a70 h: refs/heads/master i: 364285: 14ae9188fdda548bd66511ca7a3cb43db9f0954b 364283: aec54461108dec738ff3d6de9c0d7c02990153a3 364279: e2e0628029d785337f97a59e1231a8aa8ca19997 364271: 410a3399eda18f416cf581d4c768d81a9363f811 364255: 86fe476a520aefc94cd988846f2a4dd92c539298 364223: 8b447920d897b3572d21776d7bdedf08e2ec9f76 364159: 83ca425297435a54384e5c1baf7df1d3c293e499 364031: c52d921fce9e6bc499f995f5421787cc72701697 v: v3 --- [refs] | 2 +- trunk/drivers/tty/serial/8250/8250.c | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/[refs] b/[refs] index 9ab437f47da7..f9f277f91252 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 65c1b12b453ec726fe0692707a8a2493502bd6a2 +refs/heads/master: cfcec52e9781f08948c6eb98198d65c45be75a70 diff --git a/trunk/drivers/tty/serial/8250/8250.c b/trunk/drivers/tty/serial/8250/8250.c index 19ebbdf43106..e5ddfd6fc468 100644 --- a/trunk/drivers/tty/serial/8250/8250.c +++ b/trunk/drivers/tty/serial/8250/8250.c @@ -2755,7 +2755,7 @@ static void __init serial8250_isa_init_ports(void) if (nr_uarts > UART_NR) nr_uarts = UART_NR; - for (i = 0; i < nr_uarts; i++) { + for (i = 0; i < UART_NR; i++) { struct uart_8250_port *up = &serial8250_ports[i]; struct uart_port *port = &up->port; @@ -2916,7 +2916,7 @@ static int __init serial8250_console_setup(struct console *co, char *options) * if so, search for the first available port that does have * console support. */ - if (co->index >= nr_uarts) + if (co->index >= UART_NR) co->index = 0; port = &serial8250_ports[co->index].port; if (!port->iobase && !port->membase) @@ -2957,7 +2957,7 @@ int serial8250_find_port(struct uart_port *p) int line; struct uart_port *port; - for (line = 0; line < nr_uarts; line++) { + for (line = 0; line < UART_NR; line++) { port = &serial8250_ports[line].port; if (uart_match_port(p, port)) return line; @@ -3110,7 +3110,7 @@ static int serial8250_remove(struct platform_device *dev) { int i; - for (i = 0; i < nr_uarts; i++) { + for (i = 0; i < UART_NR; i++) { struct uart_8250_port *up = &serial8250_ports[i]; if (up->port.dev == &dev->dev) @@ -3178,7 +3178,7 @@ static struct uart_8250_port *serial8250_find_match_or_unused(struct uart_port * /* * First, find a port entry which matches. */ - for (i = 0; i < nr_uarts; i++) + for (i = 0; i < UART_NR; i++) if (uart_match_port(&serial8250_ports[i].port, port)) return &serial8250_ports[i]; @@ -3187,7 +3187,7 @@ static struct uart_8250_port *serial8250_find_match_or_unused(struct uart_port * * free entry. We look for one which hasn't been previously * used (indicated by zero iobase). */ - for (i = 0; i < nr_uarts; i++) + for (i = 0; i < UART_NR; i++) if (serial8250_ports[i].port.type == PORT_UNKNOWN && serial8250_ports[i].port.iobase == 0) return &serial8250_ports[i]; @@ -3196,7 +3196,7 @@ static struct uart_8250_port *serial8250_find_match_or_unused(struct uart_port * * That also failed. Last resort is to find any entry which * doesn't have a real port associated with it. */ - for (i = 0; i < nr_uarts; i++) + for (i = 0; i < UART_NR; i++) if (serial8250_ports[i].port.type == PORT_UNKNOWN) return &serial8250_ports[i];