aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/serial/bfin_5xx.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/serial/bfin_5xx.c b/drivers/serial/bfin_5xx.c
index 1dc9b583fa62..8dab6644297c 100644
--- a/drivers/serial/bfin_5xx.c
+++ b/drivers/serial/bfin_5xx.c
@@ -151,7 +151,8 @@ void kgdb_put_debug_char(int chr)
151{ 151{
152 struct bfin_serial_port *uart; 152 struct bfin_serial_port *uart;
153 153
154 if (CONFIG_KGDB_UART_PORT<0 || CONFIG_KGDB_UART_PORT>=NR_PORTS) 154 if (CONFIG_KGDB_UART_PORT < 0
155 || CONFIG_KGDB_UART_PORT >= BFIN_UART_NR_PORTS)
155 uart = &bfin_serial_ports[0]; 156 uart = &bfin_serial_ports[0];
156 else 157 else
157 uart = &bfin_serial_ports[CONFIG_KGDB_UART_PORT]; 158 uart = &bfin_serial_ports[CONFIG_KGDB_UART_PORT];
@@ -173,7 +174,8 @@ int kgdb_get_debug_char(void)
173 struct bfin_serial_port *uart; 174 struct bfin_serial_port *uart;
174 unsigned char chr; 175 unsigned char chr;
175 176
176 if (CONFIG_KGDB_UART_PORT<0 || CONFIG_KGDB_UART_PORT>=NR_PORTS) 177 if (CONFIG_KGDB_UART_PORT < 0
178 || CONFIG_KGDB_UART_PORT >= BFIN_UART_NR_PORTS)
177 uart = &bfin_serial_ports[0]; 179 uart = &bfin_serial_ports[0];
178 else 180 else
179 uart = &bfin_serial_ports[CONFIG_KGDB_UART_PORT]; 181 uart = &bfin_serial_ports[CONFIG_KGDB_UART_PORT];
@@ -1193,7 +1195,7 @@ static struct uart_driver bfin_serial_reg = {
1193 .dev_name = BFIN_SERIAL_NAME, 1195 .dev_name = BFIN_SERIAL_NAME,
1194 .major = BFIN_SERIAL_MAJOR, 1196 .major = BFIN_SERIAL_MAJOR,
1195 .minor = BFIN_SERIAL_MINOR, 1197 .minor = BFIN_SERIAL_MINOR,
1196 .nr = NR_PORTS, 1198 .nr = BFIN_UART_NR_PORTS,
1197 .cons = BFIN_SERIAL_CONSOLE, 1199 .cons = BFIN_SERIAL_CONSOLE,
1198}; 1200};
1199 1201