projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c8c6bfa
)
serial: speed setup failure reporting
author
Alan Cox
<
[email protected]
>
Tue, 5 Feb 2008 06:27:53 +0000
(22:27 -0800)
committer
Linus Torvalds
<
[email protected]
>
Tue, 5 Feb 2008 17:44:10 +0000
(09:44 -0800)
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
patch
|
blob
|
history
diff --git
a/drivers/serial/serial_core.c
b/drivers/serial/serial_core.c
index 304fe32eb066289caf53fddc6d7a96bea3e2dd84..276da148c57e015a6a148ec60a028d3d2e840ba6 100644
(file)
--- 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
*/
- t
ermios->c_cflag |= B9600
;
+ t
ty_termios_encode_baud_rate(termios, 9600, 9600)
;
}
return 0;