diff options
author | John Ogness <john.ogness@linutronix.de> | 2022-11-16 19:21:42 +0300 |
---|---|---|
committer | Petr Mladek <pmladek@suse.com> | 2022-12-02 13:25:02 +0300 |
commit | 9490b22ab39d12a06ab60465f2c4fc6a18d99752 (patch) | |
tree | 8fcfebb767af4b46f73bce906f8cf2b977e3e094 /drivers | |
parent | 4b71a443cb0abdddaf08a5991e28fc510a8d3abd (diff) | |
download | linux-9490b22ab39d12a06ab60465f2c4fc6a18d99752.tar.xz |
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')
-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); } |