diff options
| author | Ingo Molnar <mingo@elte.hu> | 2010-10-25 19:38:43 +0200 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2010-10-25 19:38:52 +0200 |
| commit | 7d7a48b76012eeee25871e1d69104dec4b6d740f (patch) | |
| tree | c27e3d8bb2e80ad93c7b4a5c850e1ffbc090bcd2 /include/linux/serial_core.h | |
| parent | e4072a9a9d186fe86293effe8828faa4be75b4a4 (diff) | |
| parent | 229aebb873e29726b91e076161649cf45154b0bf (diff) | |
Merge branch 'linus' into x86/urgent
Merge reason: We want to queue up a dependent fix.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/serial_core.h')
| -rw-r--r-- | include/linux/serial_core.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index 563e23400913..99e5994e6f84 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h @@ -289,6 +289,8 @@ struct uart_port { void (*set_termios)(struct uart_port *, struct ktermios *new, struct ktermios *old); + void (*pm)(struct uart_port *, unsigned int state, + unsigned int old); unsigned int irq; /* irq number */ unsigned long irqflags; /* irq flags */ unsigned int uartclk; /* base uart clock */ @@ -411,6 +413,14 @@ unsigned int uart_get_baud_rate(struct uart_port *port, struct ktermios *termios unsigned int max); unsigned int uart_get_divisor(struct uart_port *port, unsigned int baud); +/* Base timer interval for polling */ +static inline int uart_poll_timeout(struct uart_port *port) +{ + int timeout = port->timeout; + + return timeout > 6 ? (timeout / 2 - 2) : 1; +} + /* * Console helpers. */ |
