From f67020a433c2af9c3b6e4922a97a87ae3c51c340 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Mon, 16 Feb 2004 00:20:24 -0800 Subject: [PATCH] Revert the dodgy ia64 serial console changeset by Bjorn Helgaas. It results in serial console getting initialised really late and the suggested workaround is broken according to Keith. Cset exclude: akpm@osdl.org|ChangeSet|20040213234712|28554 --- drivers/serial/8250.c | 10 ---------- drivers/serial/serial_core.c | 3 +++ 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c index 904242a8a67bd..e1cf834f0f6fb 100644 --- a/drivers/serial/8250.c +++ b/drivers/serial/8250.c @@ -1976,8 +1976,6 @@ static int __init serial8250_console_setup(struct console *co, char *options) if (co->index >= UART_NR) co->index = 0; port = &serial8250_ports[co->index].port; - if (port->type == PORT_UNKNOWN) - return -ENODEV; /* * Temporary fix. @@ -2009,14 +2007,6 @@ static int __init serial8250_console_init(void) } console_initcall(serial8250_console_init); -static int __init serial8250_late_console_init(void) -{ - if (!(serial8250_console.flags & CON_ENABLED)) - register_console(&serial8250_console); - return 0; -} -late_initcall(serial8250_late_console_init); - #define SERIAL8250_CONSOLE &serial8250_console #else #define SERIAL8250_CONSOLE NULL diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c index 94fe0f66224f0..a78f0521e4c33 100644 --- a/drivers/serial/serial_core.c +++ b/drivers/serial/serial_core.c @@ -1871,6 +1871,9 @@ uart_set_options(struct uart_port *port, struct console *co, if (flow == 'r') termios.c_cflag |= CRTSCTS; + if (!port->ops) + return 0; /* "console=" on ia64 */ + port->ops->set_termios(port, &termios, NULL); co->cflag = termios.c_cflag; -- 2.53.0