spin_unlock_irqrestore(&port->lock, flags);
/*
+ * If this driver supports console, and it hasn't been
+ * successfully registered yet, try to re-register it.
+ * It may be that the port was not available.
+ */
+ if (port->cons && !(port->cons->flags & CON_ENABLED))
+ register_console(port->cons);
+
+ /*
* Power down all ports by default, except the
* console if we have one.
*/
}
state->port = port;
+ state->pm_state = -1;
port->cons = drv->cons;
port->info = state->info;
tty_register_device(drv->tty_driver, port->line, port->dev);
/*
- * If this driver supports console, and it hasn't been
- * successfully registered yet, try to re-register it.
- * It may be that the port was not available.
- */
- if (port->type != PORT_UNKNOWN &&
- port->cons && !(port->cons->flags & CON_ENABLED))
- register_console(port->cons);
-
- /*
* Ensure UPF_DEAD is not set.
*/
port->flags &= ~UPF_DEAD;