diff options
author | Michal Simek <michal.simek@xilinx.com> | 2018-04-23 05:51:00 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-04-25 08:58:44 -0400 |
commit | 0f38c5e3e0ade98b49e2c7ca5550ee9e36cbc04f (patch) | |
tree | 1622b391f955e11efef6849eb295991550bd9f1c | |
parent | e76785d092ab8356d24996754f0ff1917021fcb6 (diff) |
serial: uartps: Remove console_initcall from the driver
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>
-rw-r--r-- | drivers/tty/serial/xilinx_uartps.c | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c index 3ec4efbf25a9..04fc10603855 100644 --- a/drivers/tty/serial/xilinx_uartps.c +++ b/drivers/tty/serial/xilinx_uartps.c | |||
@@ -1293,20 +1293,6 @@ static struct console cdns_uart_console = { | |||
1293 | .index = -1, /* Specified on the cmdline (e.g. console=ttyPS ) */ | 1293 | .index = -1, /* Specified on the cmdline (e.g. console=ttyPS ) */ |
1294 | .data = &cdns_uart_uart_driver, | 1294 | .data = &cdns_uart_uart_driver, |
1295 | }; | 1295 | }; |
1296 | |||
1297 | /** | ||
1298 | * cdns_uart_console_init - Initialization call | ||
1299 | * | ||
1300 | * Return: 0 on success, negative errno otherwise | ||
1301 | */ | ||
1302 | static int __init cdns_uart_console_init(void) | ||
1303 | { | ||
1304 | register_console(&cdns_uart_console); | ||
1305 | return 0; | ||
1306 | } | ||
1307 | |||
1308 | console_initcall(cdns_uart_console_init); | ||
1309 | |||
1310 | #endif /* CONFIG_SERIAL_XILINX_PS_UART_CONSOLE */ | 1296 | #endif /* CONFIG_SERIAL_XILINX_PS_UART_CONSOLE */ |
1311 | 1297 | ||
1312 | static struct uart_driver cdns_uart_uart_driver = { | 1298 | static struct uart_driver cdns_uart_uart_driver = { |