提交 805ece2a 编写于 作者: A Arvind Sankar 提交者: Greg Kroah-Hartman

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: NArvind Sankar <nivedita@alum.mit.edu>
Link: https://lore.kernel.org/r/20191218214506.49252-3-nivedita@alum.mit.eduSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 e018bc28
......@@ -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();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册