diff options
author | John Ogness <john.ogness@linutronix.de> | 2022-11-16 17:27:42 +0106 |
---|---|---|
committer | Petr Mladek <pmladek@suse.com> | 2022-12-02 11:25:02 +0100 |
commit | 9490b22ab39d12a06ab60465f2c4fc6a18d99752 (patch) | |
tree | 8fcfebb767af4b46f73bce906f8cf2b977e3e094 /drivers/usb | |
parent | tty: serial: xilinx_uartps: use console_is_registered() (diff) | |
download | wireguard-linux-9490b22ab39d12a06ab60465f2c4fc6a18d99752.tar.xz wireguard-linux-9490b22ab39d12a06ab60465f2c4fc6a18d99752.zip |
usb: early: xhci-dbc: 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-31-john.ogness@linutronix.de
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/early/xhci-dbc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/early/xhci-dbc.c b/drivers/usb/early/xhci-dbc.c index bfb7e2b85299..797047154820 100644 --- a/drivers/usb/early/xhci-dbc.c +++ b/drivers/usb/early/xhci-dbc.c @@ -927,7 +927,7 @@ void __init early_xdbc_register_console(void) static void xdbc_unregister_console(void) { - if (early_xdbc_console.flags & CON_ENABLED) + if (console_is_registered(&early_xdbc_console)) unregister_console(&early_xdbc_console); } |