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 <[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 6e35d97 commit f5bea48

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)