| From | John Ogness <> | Subject | [PATCH printk v2 05/38] printk: use console_is_enabled() | Date | Wed, 19 Oct 2022 17:01:27 +0206 |
| |
Replace (console->flags & CON_ENABLED) usage with console_is_enabled().
Signed-off-by: John Ogness <john.ogness@linutronix.de> --- kernel/printk/printk.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index e8a56056cd50..7ff2fc75fc3b 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@ -2658,7 +2658,7 @@ static bool abandon_console_lock_in_panic(void) */ static inline bool console_is_usable(struct console *con) { - if (!(con->flags & CON_ENABLED)) + if (!console_is_enabled(con)) return false; if (!con->write) @@ -2944,7 +2944,7 @@ void console_unblank(void) console_locked = 1; console_may_schedule = 0; for_each_console(c) - if ((c->flags & CON_ENABLED) && c->unblank) + if (console_is_enabled(c) && c->unblank) c->unblank(); console_unlock(); @@ -3098,7 +3098,7 @@ static int try_enable_preferred_console(struct console *newcon, * without matching. Accept the pre-enabled consoles only when match() * and setup() had a chance to be called. */ - if (newcon->flags & CON_ENABLED && c->user_specified == user_specified) + if (console_is_enabled(newcon) && (c->user_specified == user_specified)) return 0; return -ENOENT; -- 2.30.2
|