diff options
author | John Ogness <john.ogness@linutronix.de> | 2022-11-16 19:21:41 +0300 |
---|---|---|
committer | Petr Mladek <pmladek@suse.com> | 2022-12-02 13:25:01 +0300 |
commit | 4b71a443cb0abdddaf08a5991e28fc510a8d3abd (patch) | |
tree | 59a15b0c53fb678e48ce01efa3033bddc966ccdf /drivers/tty | |
parent | ad3b7f6141f8eeac275ca3f93c81596250125b4c (diff) | |
download | linux-4b71a443cb0abdddaf08a5991e28fc510a8d3abd.tar.xz |
tty: serial: xilinx_uartps: use console_is_registered()
It is not reliable to check for CON_ENABLED in order to identify if a
console is registered. Use console_is_registered() instead.
Signed-off-by: John Ogness <john.ogness@linutronix.de>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Signed-off-by: Petr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/20221116162152.193147-30-john.ogness@linutronix.de
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/serial/xilinx_uartps.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c index 2eff7cff57c4..0cbd1892c53b 100644 --- a/drivers/tty/serial/xilinx_uartps.c +++ b/drivers/tty/serial/xilinx_uartps.c @@ -1631,7 +1631,7 @@ static int cdns_uart_probe(struct platform_device *pdev) #ifdef CONFIG_SERIAL_XILINX_PS_UART_CONSOLE /* This is not port which is used for console that's why clean it up */ if (console_port == port && - !(cdns_uart_uart_driver.cons->flags & CON_ENABLED)) { + !console_is_registered(cdns_uart_uart_driver.cons)) { console_port = NULL; cdns_uart_console.index = -1; } |