printk: Set console_set_on_cmdline=1 when __add_preferred_console() is called with...
authorAndre Kalb <andre.kalb@sma.de>
Wed, 16 Feb 2022 10:41:38 +0000 (11:41 +0100)
committerPetr Mladek <pmladek@suse.com>
Mon, 21 Feb 2022 14:52:08 +0000 (15:52 +0100)
commita5a763b2b26678f1e01b2d031819b175d8f14555
treefbad2042c0abcaf53998c5647bf678213ca344ae
parent96b02f2fbde29a08ac7239fd9ba87ff870cf8a94
printk: Set console_set_on_cmdline=1 when __add_preferred_console() is called with user_specified == true

In case of using console="" or console=null
set console_set_on_cmdline=1 to disable "stdout-path" node from DT.

We basically need to set it every time when __add_preferred_console()
is called with parameter 'user_specified' set.
Therefore we can move setting it into a helper function that is
called from __add_preferred_console().

Suggested-by: Petr Mladek <pmladek@suse.com>
Signed-off-by: Andre Kalb <andre.kalb@sma.de>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Signed-off-by: Petr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/YgzU4ho8l6XapyG2@pc6682
kernel/printk/printk.c