Skip to content

Commit f5bea48

Browse files
jognesspmladek
authored andcommitted
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
1 parent 6e35d97 commit f5bea48

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/tty/serial/pic32_uart.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -843,7 +843,7 @@ console_initcall(pic32_console_init);
843843
*/
844844
static int __init pic32_late_console_init(void)
845845
{
846-
if (!(pic32_console.flags & CON_ENABLED))
846+
if (!console_is_registered(&pic32_console))
847847
register_console(&pic32_console);
848848

849849
return 0;

0 commit comments

Comments
 (0)