projects
/
platform
/
adaptation
/
renesas_rcar
/
renesas_kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
serial: Fix divide-by-zero fault in uart_get_divisor()
[platform/adaptation/renesas_rcar/renesas_kernel.git]
/
drivers
/
tty
/
serial
/
serial_core.c
diff --git
a/drivers/tty/serial/serial_core.c
b/drivers/tty/serial/serial_core.c
index
ece2049
..
27b5554
100644
(file)
--- a/
drivers/tty/serial/serial_core.c
+++ b/
drivers/tty/serial/serial_core.c
@@
-235,6
+235,9
@@
static void uart_shutdown(struct tty_struct *tty, struct uart_state *state)
/*
* Turn off DTR and RTS early.
*/
/*
* Turn off DTR and RTS early.
*/
+ if (uart_console(uport) && tty)
+ uport->cons->cflag = tty->termios.c_cflag;
+
if (!tty || (tty->termios.c_cflag & HUPCL))
uart_clear_mctrl(uport, TIOCM_DTR | TIOCM_RTS);
if (!tty || (tty->termios.c_cflag & HUPCL))
uart_clear_mctrl(uport, TIOCM_DTR | TIOCM_RTS);
@@
-350,7
+353,7
@@
uart_get_baud_rate(struct uart_port *port, struct ktermios *termios,
* The spd_hi, spd_vhi, spd_shi, spd_warp kludge...
* Die! Die! Die!
*/
* The spd_hi, spd_vhi, spd_shi, spd_warp kludge...
* Die! Die! Die!
*/
- if (baud == 38400)
+ if (
try == 0 &&
baud == 38400)
baud = altbaud;
/*
baud = altbaud;
/*