From: Michal Simek Date: Mon, 3 Sep 2018 13:10:49 +0000 (+0200) Subject: serial: uartps: console_setup() can't be placed to init section X-Git-Tag: v4.20-rc1~71^2~67 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=4bb1ce2350a598502b23088b169e16b43d4bc639;p=linux-block.git serial: uartps: console_setup() can't be placed to init section When console device is rebinded, console_setup() is called again. But marking it as __init means that function will be clear after boot is complete. If console device is binded again console_setup() is not found and error "Unable to handle kernel paging request at virtual address" is reported. Signed-off-by: Michal Simek Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c index a48f19b1b88f..fdb984b9eb28 100644 --- a/drivers/tty/serial/xilinx_uartps.c +++ b/drivers/tty/serial/xilinx_uartps.c @@ -1217,7 +1217,7 @@ static void cdns_uart_console_write(struct console *co, const char *s, * * Return: 0 on success, negative errno otherwise. */ -static int __init cdns_uart_console_setup(struct console *co, char *options) +static int cdns_uart_console_setup(struct console *co, char *options) { struct uart_port *port = console_port;