printk: nbcon: Consolidate alloc() and init()

Rather than splitting the nbcon allocation and initialization into
two pieces, perform all initialization in nbcon_alloc(). Later,
the initial sequence is calculated and can be explicitly set using
nbcon_seq_force(). This removes the need for the strong rules of
nbcon_init() that even included a BUG_ON().

Signed-off-by: John Ogness <john.ogness@linutronix.de>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/20240820063001.36405-3-john.ogness@linutronix.de
Signed-off-by: Petr Mladek <pmladek@suse.com>
This commit is contained in:
John Ogness
2024-08-20 08:35:28 +02:06
committed by Petr Mladek
parent eda25860bf
commit f37b105fae
3 changed files with 12 additions and 29 deletions
+1 -1
View File
@@ -3618,7 +3618,7 @@ void register_console(struct console *newcon)
console_init_seq(newcon, bootcon_registered);
if (newcon->flags & CON_NBCON)
nbcon_init(newcon);
nbcon_seq_force(newcon, newcon->seq);
/*
* Put this console in the list - keep the