diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/tty/serial/serial_core.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c index ece2049bd270..8ece7f14d89d 100644 --- a/drivers/tty/serial/serial_core.c +++ b/drivers/tty/serial/serial_core.c @@ -2677,6 +2677,12 @@ int uart_remove_one_port(struct uart_driver *drv, struct uart_port *uport) tty_vhangup(port->tty); /* + * If the port is used as a console, unregister it + */ + if (uart_console(uport)) + unregister_console(uport->cons); + + /* * Free the port IO and memory resources, if any. */ if (uport->type != PORT_UNKNOWN) |