projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ad3b7f6
)
tty: serial: xilinx_uartps: use console_is_registered()
author
John Ogness
<john.ogness@linutronix.de>
Wed, 16 Nov 2022 16:21:41 +0000
(17:27 +0106)
committer
Petr Mladek
<pmladek@suse.com>
Fri, 2 Dec 2022 10:25:01 +0000
(11:25 +0100)
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
drivers/tty/serial/xilinx_uartps.c
patch
|
blob
|
history
diff --git
a/drivers/tty/serial/xilinx_uartps.c
b/drivers/tty/serial/xilinx_uartps.c
index 2eff7cff57c48ccd9f03096d8d992e56c3eafce6..0cbd1892c53b7012fbce8db4fec7723ee9ccfd42 100644
(file)
--- 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;
}