summaryrefslogtreecommitdiff
path: root/kernel/printk/console_cmdline.h
diff options
context:
space:
mode:
authorTony Lindgren <tony.lindgren@linux.intel.com>2024-07-03 13:06:08 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-07-04 15:41:44 +0200
commit7640f1a44eba0cc1a41b312080c236f5c668cd50 (patch)
tree2f915252361948083a63887dcd0cb87ba3115bb4 /kernel/printk/console_cmdline.h
parent33827dc4ad8982c987ad4066d643693403ce7fd0 (diff)
printk: Add match_devname_and_update_preferred_console()
Let's add match_devname_and_update_preferred_console() for driver subsystems to call during init when the console is ready, and it's character device name is known. For now, we use it only for the serial layer to allow console=DEVNAME:0.0 style hardware based addressing for consoles. The earlier attempt on doing this caused a regression with the kernel command line console order as it added calling __add_preferred_console() again later on during init. A better approach was suggested by Petr where we add the deferred console to the console_cmdline[] and update it later on when the console is ready. Suggested-by: Petr Mladek <pmladek@suse.com> Co-developed-by: Petr Mladek <pmladek@suse.com> Signed-off-by: Tony Lindgren <tony.lindgren@linux.intel.com> Reviewed-by: Petr Mladek <pmladek@suse.com> Link: https://lore.kernel.org/r/20240703100615.118762-2-tony.lindgren@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel/printk/console_cmdline.h')
-rw-r--r--kernel/printk/console_cmdline.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/printk/console_cmdline.h b/kernel/printk/console_cmdline.h
index 3ca74ad391d6..0ab573b6d4dc 100644
--- a/kernel/printk/console_cmdline.h
+++ b/kernel/printk/console_cmdline.h
@@ -6,6 +6,7 @@ struct console_cmdline
{
char name[16]; /* Name of the driver */
int index; /* Minor dev. to use */
+ char devname[32]; /* DEVNAME:0.0 style device name */
bool user_specified; /* Specified by command line vs. platform */
char *options; /* Options for the driver */
#ifdef CONFIG_A11Y_BRAILLE_CONSOLE