parisc/sticon: Always register sticon console driver
authorHelge Deller <deller@gmx.de>
Mon, 12 Oct 2020 07:05:09 +0000 (09:05 +0200)
committerHelge Deller <deller@gmx.de>
Thu, 15 Oct 2020 06:10:39 +0000 (08:10 +0200)
If the ROM provides functional STI routines, always register the sticon
driver, even if the serial console was choosen as boot device.
Additionally, in that case, do not make the sticon driver the default
output console device.

Signed-off-by: Helge Deller <deller@gmx.de>
drivers/video/console/sticon.c

index e7fd995d3aea3fc29a3fbdf3b211a9a64645eca9..7c1dcd52660079f68ba87dc3de0bffe117175f8c 100644 (file)
@@ -348,14 +348,13 @@ static int __init sticonsole_init(void)
     if (!sticon_sti)
        return -ENODEV;
 
-    if (conswitchp == &dummy_con) {
-       printk(KERN_INFO "sticon: Initializing STI text console.\n");
-       console_lock();
-       err = do_take_over_console(&sti_con, 0, MAX_NR_CONSOLES - 1, 1);
-       console_unlock();
-       return err;
-    }
-    return 0;
+    pr_info("sticon: Initializing STI text console.\n");
+    console_lock();
+    err = do_take_over_console(&sti_con, 0, MAX_NR_CONSOLES - 1,
+               PAGE0->mem_cons.cl_class != CL_DUPLEX);
+    console_unlock();
+
+    return err;
 }
 
 module_init(sticonsole_init);