Commit db34fc9e authored by David S. Miller's avatar David S. Miller

[SPARC]: Fix serial console handling.

Due to recent logic changes in uart_add_one_port(), the
serial console was being registered twice.  To avoid
this, so serial console init before we actually register
the uarts ports with the core serial layer.

Noticed by William Lee Irwin III <wli@holomorphy.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 84ac4d4a
...@@ -1125,14 +1125,14 @@ static int __init sunsab_init(void) ...@@ -1125,14 +1125,14 @@ static int __init sunsab_init(void)
sunserial_current_minor += num_channels; sunserial_current_minor += num_channels;
sunsab_console_init();
for (i = 0; i < num_channels; i++) { for (i = 0; i < num_channels; i++) {
struct uart_sunsab_port *up = &sunsab_ports[i]; struct uart_sunsab_port *up = &sunsab_ports[i];
uart_add_one_port(&sunsab_reg, &up->port); uart_add_one_port(&sunsab_reg, &up->port);
} }
sunsab_console_init();
return 0; return 0;
} }
......
...@@ -1532,6 +1532,7 @@ static int __init sunsu_serial_init(void) ...@@ -1532,6 +1532,7 @@ static int __init sunsu_serial_init(void)
if (ret < 0) if (ret < 0)
return ret; return ret;
sunsu_serial_console_init();
for (i = 0; i < UART_NR; i++) { for (i = 0; i < UART_NR; i++) {
struct uart_sunsu_port *up = &sunsu_ports[i]; struct uart_sunsu_port *up = &sunsu_ports[i];
...@@ -1704,7 +1705,6 @@ static int __init sunsu_probe(void) ...@@ -1704,7 +1705,6 @@ static int __init sunsu_probe(void)
* Console must be initiated after the generic initialization. * Console must be initiated after the generic initialization.
*/ */
sunsu_serial_init(); sunsu_serial_init();
sunsu_serial_console_init();
return 0; return 0;
} }
......
...@@ -1690,6 +1690,7 @@ static int __init sunzilog_ports_init(void) ...@@ -1690,6 +1690,7 @@ static int __init sunzilog_ports_init(void)
ret = uart_register_driver(&sunzilog_reg); ret = uart_register_driver(&sunzilog_reg);
if (ret == 0) { if (ret == 0) {
sunzilog_console_init();
for (i = 0; i < NUM_CHANNELS; i++) { for (i = 0; i < NUM_CHANNELS; i++) {
struct uart_sunzilog_port *up = &sunzilog_port_table[i]; struct uart_sunzilog_port *up = &sunzilog_port_table[i];
...@@ -1738,7 +1739,6 @@ static int __init sunzilog_init(void) ...@@ -1738,7 +1739,6 @@ static int __init sunzilog_init(void)
sunzilog_alloc_tables(); sunzilog_alloc_tables();
sunzilog_ports_init(); sunzilog_ports_init();
sunzilog_console_init();
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment