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