diff options
author | Arvind Sankar <nivedita@alum.mit.edu> | 2019-12-18 16:44:44 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-01-14 15:29:15 +0100 |
commit | 805ece2a58085c33c0c087be049b77e94c12080a (patch) | |
tree | f8f9827b067127e0ccbd5ae1a2d96a81ae7cb0d6 /drivers | |
parent | e018bc28b031348ff763b89b48b3b96f1f0e466b (diff) |
vt: Initialize conswitchp to dummy_con if unset
If the arch setup code hasn't initialized conswitchp yet, set it to
dummy_con in con_init. This will allow us to drop the dummy_con
initialization that's done in almost every architecture.
Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu>
Link: https://lore.kernel.org/r/20191218214506.49252-3-nivedita@alum.mit.edu
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/tty/vt/vt.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c index 34aa39d1aed9..2456afaf1c61 100644 --- a/drivers/tty/vt/vt.c +++ b/drivers/tty/vt/vt.c @@ -3326,8 +3326,9 @@ static int __init con_init(void) console_lock(); - if (conswitchp) - display_desc = conswitchp->con_startup(); + if (!conswitchp) + conswitchp = &dummy_con; + display_desc = conswitchp->con_startup(); if (!display_desc) { fg_console = 0; console_unlock(); |