Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 83004
b: refs/heads/master
c: c8c6bfa
h: refs/heads/master
v: v3
  • Loading branch information
Russell King authored and Linus Torvalds committed Feb 5, 2008
1 parent a9978ea commit 08ddc31
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 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: 9d778a69370cc1b643b13648df971c83ff5654ef
refs/heads/master: c8c6bfa39d6bd7347f43937c8767ae145b61bcb4
8 changes: 7 additions & 1 deletion trunk/drivers/serial/serial_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1977,6 +1977,7 @@ int uart_suspend_port(struct uart_driver *drv, struct uart_port *port)

if (state->info && state->info->flags & UIF_INITIALIZED) {
const struct uart_ops *ops = port->ops;
int tries;

state->info->flags = (state->info->flags & ~UIF_INITIALIZED)
| UIF_SUSPENDED;
Expand All @@ -1990,9 +1991,14 @@ int uart_suspend_port(struct uart_driver *drv, struct uart_port *port)
/*
* Wait for the transmitter to empty.
*/
while (!ops->tx_empty(port)) {
for (tries = 3; !ops->tx_empty(port) && tries; tries--) {
msleep(10);
}
if (!tries)
printk(KERN_ERR "%s%s%s%d: Unable to drain transmitter\n",
port->dev ? port->dev->bus_id : "",
port->dev ? ": " : "",
drv->dev_name, port->line);

ops->shutdown(port);
}
Expand Down

0 comments on commit 08ddc31

Please sign in to comment.