Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6d4d67beb963de8865499781b8523e5b683819c3 Commit: 6d4d67beb963de8865499781b8523e5b683819c3 Parent: c8c6bfa39d6bd7347f43937c8767ae145b61bcb4 Author: Alan Cox <[EMAIL PROTECTED]> AuthorDate: Mon Feb 4 22:27:53 2008 -0800 Committer: Linus Torvalds <[EMAIL PROTECTED]> CommitDate: Tue Feb 5 09:44:10 2008 -0800
serial: speed setup failure reporting Invalid speeds are forced to 9600. Update the code for this to encode new style baud rates properly. Signed-off-by: Alan Cox <[EMAIL PROTECTED]> Cc: Russell King <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]> --- drivers/serial/serial_core.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c index 304fe32..276da14 100644 --- a/drivers/serial/serial_core.c +++ b/drivers/serial/serial_core.c @@ -371,7 +371,8 @@ uart_get_baud_rate(struct uart_port *port, struct ktermios *termios, */ termios->c_cflag &= ~CBAUD; if (old) { - termios->c_cflag |= old->c_cflag & CBAUD; + baud = tty_termios_baud_rate(old); + tty_termios_encode_baud_rate(termios, baud, baud); old = NULL; continue; } @@ -380,7 +381,7 @@ uart_get_baud_rate(struct uart_port *port, struct ktermios *termios, * As a last resort, if the quotient is zero, * default to 9600 bps */ - termios->c_cflag |= B9600; + tty_termios_encode_baud_rate(termios, 9600, 9600); } return 0; - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html