1 From 4d7e5064d7f8e934f853c557dba14fb20ae7661a Mon Sep 17 00:00:00 2001
2 From: Michal Simek <michal.simek@xilinx.com>
3 Date: Mon, 3 Sep 2018 15:10:49 +0200
4 Subject: serial: uartps: console_setup() can't be placed to init section
6 [ Upstream commit 4bb1ce2350a598502b23088b169e16b43d4bc639 ]
8 When console device is rebinded, console_setup() is called again.
9 But marking it as __init means that function will be clear after boot is
10 complete. If console device is binded again console_setup() is not found
11 and error "Unable to handle kernel paging request at virtual address"
14 Signed-off-by: Michal Simek <michal.simek@xilinx.com>
15 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
16 Signed-off-by: Sasha Levin <sashal@kernel.org>
18 drivers/tty/serial/xilinx_uartps.c | 2 +-
19 1 file changed, 1 insertion(+), 1 deletion(-)
21 diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c
22 index df28ef14382b..892446cc28fa 100644
23 --- a/drivers/tty/serial/xilinx_uartps.c
24 +++ b/drivers/tty/serial/xilinx_uartps.c
25 @@ -1120,7 +1120,7 @@ static void cdns_uart_console_write(struct console *co, const char *s,
27 * Return: 0 on success, negative errno otherwise.
29 -static int __init cdns_uart_console_setup(struct console *co, char *options)
30 +static int cdns_uart_console_setup(struct console *co, char *options)
32 struct uart_port *port = &cdns_uart_port[co->index];