aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Ogness <[email protected]>2022-11-16 17:27:39 +0106
committerPetr Mladek <[email protected]>2022-12-02 11:25:01 +0100
commitf5bea480f1367135b2017f075865115b2e40ba08 (patch)
tree00b88e85f8c04d721c61f3bffa509e5c8ccfc182
parent6e35d977fa1e2840e40ad6f09deefdf39d8437b4 (diff)
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 <[email protected]> Reviewed-by: Petr Mladek <[email protected]> Signed-off-by: Petr Mladek <[email protected]> Link: https://lore.kernel.org/r/[email protected]
-rw-r--r--drivers/tty/serial/pic32_uart.c2
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;