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
This commit is contained in:
parent
ad3b7f6141
commit
4b71a443cb
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user