tty: nfcon: use console_is_registered()
authorJohn Ogness <john.ogness@linutronix.de>
Wed, 16 Nov 2022 16:21:35 +0000 (17:27 +0106)
committerPetr Mladek <pmladek@suse.com>
Fri, 2 Dec 2022 10:25:01 +0000 (11:25 +0100)
commitde61a1a3a08307103d4ccfe59724bc05570e5abd
tree08a617bee295bbaec5fcc2be527b67e9a3b81c95
parent452b9b24754044eced1508f9090611f3d9aa4ca5
tty: nfcon: use console_is_registered()

Currently CON_ENABLED is being (mis)used to identify if the console
has been registered. This is not reliable because it can be set even
though registration failed or it can be unset, even though the console
is registered. Use console_is_registered() instead.

Signed-off-by: John Ogness <john.ogness@linutronix.de>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Petr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/20221116162152.193147-24-john.ogness@linutronix.de
arch/m68k/emu/nfcon.c