diff options
author | John Ogness <john.ogness@linutronix.de> | 2022-11-16 17:27:40 +0106 |
---|---|---|
committer | Petr Mladek <pmladek@suse.com> | 2022-12-02 11:25:01 +0100 |
commit | ad3b7f6141f8eeac275ca3f93c81596250125b4c (patch) | |
tree | 6c9a5c5a0a4d4673d128a38a6e50dd6e5cf89969 /drivers/tty/serial | |
parent | f5bea480f1367135b2017f075865115b2e40ba08 (diff) | |
download | linux-stable-ad3b7f6141f8eeac275ca3f93c81596250125b4c.tar.gz linux-stable-ad3b7f6141f8eeac275ca3f93c81596250125b4c.tar.bz2 linux-stable-ad3b7f6141f8eeac275ca3f93c81596250125b4c.zip |
tty: serial: samsung_tty: 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-29-john.ogness@linutronix.de
Diffstat (limited to 'drivers/tty/serial')
-rw-r--r-- | drivers/tty/serial/samsung_tty.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c index 77d1363029f5..9c252c9ca95a 100644 --- a/drivers/tty/serial/samsung_tty.c +++ b/drivers/tty/serial/samsung_tty.c @@ -1732,7 +1732,7 @@ static void __init s3c24xx_serial_register_console(void) static void s3c24xx_serial_unregister_console(void) { - if (s3c24xx_serial_console.flags & CON_ENABLED) + if (console_is_registered(&s3c24xx_serial_console)) unregister_console(&s3c24xx_serial_console); } |