Skip to content

Commit 4b71a44

Browse files
jognesspmladek
authored andcommitted
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 <[email protected]> Reviewed-by: Petr Mladek <[email protected]> Signed-off-by: Petr Mladek <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent ad3b7f6 commit 4b71a44

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/tty/serial/xilinx_uartps.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1631,7 +1631,7 @@ static int cdns_uart_probe(struct platform_device *pdev)
16311631
#ifdef CONFIG_SERIAL_XILINX_PS_UART_CONSOLE
16321632
/* This is not port which is used for console that's why clean it up */
16331633
if (console_port == port &&
1634-
!(cdns_uart_uart_driver.cons->flags & CON_ENABLED)) {
1634+
!console_is_registered(cdns_uart_uart_driver.cons)) {
16351635
console_port = NULL;
16361636
cdns_uart_console.index = -1;
16371637
}

0 commit comments

Comments
 (0)