]> rtime.felk.cvut.cz Git - zynq/linux.git/commitdiff
serial: uartps: Remove console_initcall from the driver
authorMichal Simek <michal.simek@xilinx.com>
Mon, 23 Apr 2018 09:51:00 +0000 (11:51 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 25 Apr 2018 12:58:44 +0000 (14:58 +0200)
register_console() is called from
uart_add_one_port()->uart_configure_port()
that's why register_console() is called twice.

This patch remove console_initcall to call register_console() only from
one location.

Also based on my tests cdns_uart_console_setup() is not called
from the first register_console() call.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/xilinx_uartps.c

index 3ec4efbf25a92b5b48d45d47ebb070d657c374f3..04fc10603855cbac6d91124503778f105e358ff9 100644 (file)
@@ -1293,20 +1293,6 @@ static struct console cdns_uart_console = {
        .index  = -1, /* Specified on the cmdline (e.g. console=ttyPS ) */
        .data   = &cdns_uart_uart_driver,
 };
-
-/**
- * cdns_uart_console_init - Initialization call
- *
- * Return: 0 on success, negative errno otherwise
- */
-static int __init cdns_uart_console_init(void)
-{
-       register_console(&cdns_uart_console);
-       return 0;
-}
-
-console_initcall(cdns_uart_console_init);
-
 #endif /* CONFIG_SERIAL_XILINX_PS_UART_CONSOLE */
 
 static struct uart_driver cdns_uart_uart_driver = {