diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/serial_core.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index 563e23400913..ac48082f3559 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h @@ -411,6 +411,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. */ |