diff options
| author | Russell King <rmk@flint.arm.linux.org.uk> | 2003-01-08 23:21:39 +0000 |
|---|---|---|
| committer | Russell King <rmk@flint.arm.linux.org.uk> | 2003-01-08 23:21:39 +0000 |
| commit | 077746a2ce37e3cb7d3fd7aa439e7ef52c8b6112 (patch) | |
| tree | bf0e3831ea91919d61d1674a3e0f8f63f31b2ec3 /include | |
| parent | 994ee212940a805bbbca18f9866dfea64d934a6e (diff) | |
[SERIAL] Restrict the baud rates returnable from uart_get_baud_rate()
Supply the old termios, along with the max and min acceptable baud
rate to uart_get_baud_rate(). uart_get_baud_rate() will now try to
find a baud rate that satisfies the max and min constraint out of
(requested rate, old rate, 9600 baud).
We remove the code which performed a similar act in uart_get_divisor()
and pass an appropriate min and max baud rate to uart_get_baud_rate()
based on the UART clock rate.
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/serial_core.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index 58fe38afbd8e..41b764e48f77 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h @@ -280,8 +280,9 @@ void uart_write_wakeup(struct uart_port *port); */ void uart_update_timeout(struct uart_port *port, unsigned int cflag, unsigned int quot); -unsigned int uart_get_baud_rate(struct uart_port *port, - struct termios *termios); +unsigned int uart_get_baud_rate(struct uart_port *port, struct termios *termios + struct termios *old, unsigned int min, + unsigned int max); unsigned int uart_get_divisor(struct uart_port *port, struct termios *termios, struct termios *old_termios); |
