linux-parisc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] parisc/sticon: Always register sticon console driver
@ 2020-10-12  7:13 Helge Deller
  0 siblings, 0 replies; only message in thread
From: Helge Deller @ 2020-10-12  7:13 UTC (permalink / raw)
  To: linux-parisc, James Bottomley, John David Anglin

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>

diff --git a/drivers/video/console/sticon.c b/drivers/video/console/sticon.c
index 21a5c280c8c9..8647d2b654b1 100644
--- a/drivers/video/console/sticon.c
+++ b/drivers/video/console/sticon.c
@@ -355,14 +355,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);

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-10-12  7:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-12  7:13 [PATCH] parisc/sticon: Always register sticon console driver Helge Deller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).