diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/serial/serial_core.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c index a055f58f342f..a3bd3a3f41f3 100644 --- a/drivers/serial/serial_core.c +++ b/drivers/serial/serial_core.c | |||
@@ -2127,6 +2127,14 @@ uart_configure_port(struct uart_driver *drv, struct uart_state *state, | |||
2127 | spin_unlock_irqrestore(&port->lock, flags); | 2127 | spin_unlock_irqrestore(&port->lock, flags); |
2128 | 2128 | ||
2129 | /* | 2129 | /* |
2130 | * If this driver supports console, and it hasn't been | ||
2131 | * successfully registered yet, try to re-register it. | ||
2132 | * It may be that the port was not available. | ||
2133 | */ | ||
2134 | if (port->cons && !(port->cons->flags & CON_ENABLED)) | ||
2135 | register_console(port->cons); | ||
2136 | |||
2137 | /* | ||
2130 | * Power down all ports by default, except the | 2138 | * Power down all ports by default, except the |
2131 | * console if we have one. | 2139 | * console if we have one. |
2132 | */ | 2140 | */ |
@@ -2286,6 +2294,7 @@ int uart_add_one_port(struct uart_driver *drv, struct uart_port *port) | |||
2286 | } | 2294 | } |
2287 | 2295 | ||
2288 | state->port = port; | 2296 | state->port = port; |
2297 | state->pm_state = -1; | ||
2289 | 2298 | ||
2290 | port->cons = drv->cons; | 2299 | port->cons = drv->cons; |
2291 | port->info = state->info; | 2300 | port->info = state->info; |
@@ -2308,15 +2317,6 @@ int uart_add_one_port(struct uart_driver *drv, struct uart_port *port) | |||
2308 | tty_register_device(drv->tty_driver, port->line, port->dev); | 2317 | tty_register_device(drv->tty_driver, port->line, port->dev); |
2309 | 2318 | ||
2310 | /* | 2319 | /* |
2311 | * If this driver supports console, and it hasn't been | ||
2312 | * successfully registered yet, try to re-register it. | ||
2313 | * It may be that the port was not available. | ||
2314 | */ | ||
2315 | if (port->type != PORT_UNKNOWN && | ||
2316 | port->cons && !(port->cons->flags & CON_ENABLED)) | ||
2317 | register_console(port->cons); | ||
2318 | |||
2319 | /* | ||
2320 | * Ensure UPF_DEAD is not set. | 2320 | * Ensure UPF_DEAD is not set. |
2321 | */ | 2321 | */ |
2322 | port->flags &= ~UPF_DEAD; | 2322 | port->flags &= ~UPF_DEAD; |