Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 69545
b: refs/heads/master
c: 97d9722
h: refs/heads/master
i:
  69543: 5698085
v: v3
  • Loading branch information
Russell King authored and Russell King committed Oct 15, 2007
1 parent 5d84dfa commit f213808
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a06748ab546fa95c497f10c290221f4a9f249f9b
refs/heads/master: 97d97224ff361e08777fb33e0fd193ca877dac28
18 changes: 9 additions & 9 deletions trunk/drivers/serial/serial_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -2126,6 +2126,14 @@ uart_configure_port(struct uart_driver *drv, struct uart_state *state,
port->ops->set_mctrl(port, 0);
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.
Expand Down Expand Up @@ -2286,6 +2294,7 @@ int uart_add_one_port(struct uart_driver *drv, struct uart_port *port)
}

state->port = port;
state->pm_state = -1;

port->cons = drv->cons;
port->info = state->info;
Expand All @@ -2307,15 +2316,6 @@ int uart_add_one_port(struct uart_driver *drv, struct uart_port *port)
*/
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.
*/
Expand Down

0 comments on commit f213808

Please sign in to comment.