serial_core: Unregister console in uart_remove_one_port()
authorGeert Uytterhoeven <geert+renesas@linux-m68k.org>
Fri, 28 Feb 2014 13:21:32 +0000 (14:21 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 1 Mar 2014 00:39:38 +0000 (16:39 -0800)
commit5f5c9ae56c38942623f69c3e6dc6ec78e4da2076
treea2b1b0fd442c91461359933b0ff9f34f5b29acbf
parenta3c1fa99f4d2a635f6660b946f950d379bc8271c
serial_core: Unregister console in uart_remove_one_port()

If the serial port being removed is used as a console, it must also be
unregistered from the console subsystem using unregister_console().

uart_ops.release_port() will release resources (e.g. iounmap() the serial
port registers), causing a crash on subsequent kernel output if the console
is still registered.

Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/serial_core.c