diff options
Diffstat (limited to 'drivers/tty/serial')
-rw-r--r-- | drivers/tty/serial/mfd.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/drivers/tty/serial/mfd.c b/drivers/tty/serial/mfd.c index 286c386d9c46..565f3fe3dd77 100644 --- a/drivers/tty/serial/mfd.c +++ b/drivers/tty/serial/mfd.c | |||
@@ -1156,7 +1156,6 @@ serial_hsu_console_setup(struct console *co, char *options) | |||
1156 | int bits = 8; | 1156 | int bits = 8; |
1157 | int parity = 'n'; | 1157 | int parity = 'n'; |
1158 | int flow = 'n'; | 1158 | int flow = 'n'; |
1159 | int ret; | ||
1160 | 1159 | ||
1161 | if (co->index == -1 || co->index >= serial_hsu_reg.nr) | 1160 | if (co->index == -1 || co->index >= serial_hsu_reg.nr) |
1162 | co->index = 0; | 1161 | co->index = 0; |
@@ -1167,9 +1166,7 @@ serial_hsu_console_setup(struct console *co, char *options) | |||
1167 | if (options) | 1166 | if (options) |
1168 | uart_parse_options(options, &baud, &parity, &bits, &flow); | 1167 | uart_parse_options(options, &baud, &parity, &bits, &flow); |
1169 | 1168 | ||
1170 | ret = uart_set_options(&up->port, co, baud, parity, bits, flow); | 1169 | return uart_set_options(&up->port, co, baud, parity, bits, flow); |
1171 | |||
1172 | return ret; | ||
1173 | } | 1170 | } |
1174 | 1171 | ||
1175 | static struct console serial_hsu_console = { | 1172 | static struct console serial_hsu_console = { |
@@ -1178,9 +1175,13 @@ static struct console serial_hsu_console = { | |||
1178 | .device = uart_console_device, | 1175 | .device = uart_console_device, |
1179 | .setup = serial_hsu_console_setup, | 1176 | .setup = serial_hsu_console_setup, |
1180 | .flags = CON_PRINTBUFFER, | 1177 | .flags = CON_PRINTBUFFER, |
1181 | .index = 2, | 1178 | .index = -1, |
1182 | .data = &serial_hsu_reg, | 1179 | .data = &serial_hsu_reg, |
1183 | }; | 1180 | }; |
1181 | |||
1182 | #define SERIAL_HSU_CONSOLE (&serial_hsu_console) | ||
1183 | #else | ||
1184 | #define SERIAL_HSU_CONSOLE NULL | ||
1184 | #endif | 1185 | #endif |
1185 | 1186 | ||
1186 | struct uart_ops serial_hsu_pops = { | 1187 | struct uart_ops serial_hsu_pops = { |
@@ -1210,6 +1211,7 @@ static struct uart_driver serial_hsu_reg = { | |||
1210 | .major = TTY_MAJOR, | 1211 | .major = TTY_MAJOR, |
1211 | .minor = 128, | 1212 | .minor = 128, |
1212 | .nr = 3, | 1213 | .nr = 3, |
1214 | .cons = SERIAL_HSU_CONSOLE, | ||
1213 | }; | 1215 | }; |
1214 | 1216 | ||
1215 | #ifdef CONFIG_PM | 1217 | #ifdef CONFIG_PM |
@@ -1344,12 +1346,6 @@ static int serial_hsu_probe(struct pci_dev *pdev, | |||
1344 | } | 1346 | } |
1345 | uart_add_one_port(&serial_hsu_reg, &uport->port); | 1347 | uart_add_one_port(&serial_hsu_reg, &uport->port); |
1346 | 1348 | ||
1347 | #ifdef CONFIG_SERIAL_MFD_HSU_CONSOLE | ||
1348 | if (index == 2) { | ||
1349 | register_console(&serial_hsu_console); | ||
1350 | uport->port.cons = &serial_hsu_console; | ||
1351 | } | ||
1352 | #endif | ||
1353 | pci_set_drvdata(pdev, uport); | 1349 | pci_set_drvdata(pdev, uport); |
1354 | } | 1350 | } |
1355 | 1351 | ||