USB: console: Fix regression in usb console on kernel boot
[cascardo/linux.git] / drivers / usb / serial / usb-serial.c
index a842164..9e6027b 100644 (file)
@@ -220,7 +220,8 @@ static int serial_open (struct tty_struct *tty, struct file *filp)
        tty->driver_data = port;
        tty_port_tty_set(&port->port, tty);
 
-       if (port->port.count == 1) {
+       /* If the console is attached, the device is already open */
+       if (port->port.count == 1 && !port->console) {
 
                /* lock this module before we call it
                 * this may fail, which means we must bail out,