]> rtime.felk.cvut.cz Git - zynq/linux.git/commitdiff
serial: uartps: console_setup() can't be placed to init section
authorMichal Simek <michal.simek@xilinx.com>
Mon, 3 Sep 2018 13:10:49 +0000 (15:10 +0200)
committerMichal Simek <michal.simek@xilinx.com>
Thu, 20 Sep 2018 13:23:54 +0000 (15:23 +0200)
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 <michal.simek@xilinx.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/xilinx_uartps.c

index e0d4fda395f08e04357a9a1e06324501a8cfbffa..41ad51b4e7dddd1c00e4302f1027aa9c47b8d67d 100644 (file)
@@ -1237,7 +1237,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 = &cdns_uart_port[co->index];
        int baud = 9600;