diff options
author | John Ogness <john.ogness@linutronix.de> | 2022-11-16 19:21:39 +0300 |
---|---|---|
committer | Petr Mladek <pmladek@suse.com> | 2022-12-02 13:25:01 +0300 |
commit | f5bea480f1367135b2017f075865115b2e40ba08 (patch) | |
tree | 00b88e85f8c04d721c61f3bffa509e5c8ccfc182 /drivers/tty | |
parent | 6e35d977fa1e2840e40ad6f09deefdf39d8437b4 (diff) | |
download | linux-f5bea480f1367135b2017f075865115b2e40ba08.tar.xz |
tty: serial: pic32_uart: 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-28-john.ogness@linutronix.de
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/serial/pic32_uart.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tty/serial/pic32_uart.c b/drivers/tty/serial/pic32_uart.c index 1183b2a26539..c38754d593ca 100644 --- a/drivers/tty/serial/pic32_uart.c +++ b/drivers/tty/serial/pic32_uart.c @@ -843,7 +843,7 @@ console_initcall(pic32_console_init); */ static int __init pic32_late_console_init(void) { - if (!(pic32_console.flags & CON_ENABLED)) + if (!console_is_registered(&pic32_console)) register_console(&pic32_console); return 0; |