efi: earlycon: use console_is_registered()
authorJohn Ogness <john.ogness@linutronix.de>
Wed, 16 Nov 2022 16:21:36 +0000 (17:27 +0106)
committerPetr Mladek <pmladek@suse.com>
Fri, 2 Dec 2022 10:25:01 +0000 (11:25 +0100)
commit794c8e847d048e3f7179e2659945767e4cf9a396
tree270321fa9df6a0ce4b15b422c56998912561d26d
parentde61a1a3a08307103d4ccfe59724bc05570e5abd
efi: earlycon: use console_is_registered()

The CON_ENABLED status of a console is a runtime setting that does not
involve the console driver. Drivers must not assume that if the console
is disabled then proper hardware management is not needed. For the EFI
earlycon case, it is about remapping/unmapping memory for the
framebuffer.

Use console_is_registered() instead of checking CON_ENABLED.

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-25-john.ogness@linutronix.de
drivers/firmware/efi/earlycon.c