]> git.karo-electronics.de Git - linux-beck.git/commitdiff
tty: serial: 8250: add CON_CONSDEV to flags
authorMatthew Leach <matthew.leach@codethink.co.uk>
Tue, 21 Jun 2016 15:19:49 +0000 (16:19 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 25 Jun 2016 21:05:13 +0000 (14:05 -0700)
When using the 8250 as a boot console and the main console results in
messages being printed twice.  The console framework will only
unregister boot consoles if a new console is registered with the
CON_CONSDEV flag set.

Set this flag for the univ8250 console to prevent double-registration.

Signed-off-by: Matthew Leach <matthew.leach@codethink.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/8250/8250_core.c

index fa823a54cf35ebf7b7e624d2c5e50d428df58309..dcf43f66404f12d2bd290a30adfe494dd056162e 100644 (file)
@@ -675,7 +675,7 @@ static struct console univ8250_console = {
        .device         = uart_console_device,
        .setup          = univ8250_console_setup,
        .match          = univ8250_console_match,
-       .flags          = CON_PRINTBUFFER | CON_ANYTIME,
+       .flags          = CON_PRINTBUFFER | CON_ANYTIME | CON_CONSDEV,
        .index          = -1,
        .data           = &serial8250_reg,
 };