diff options
Diffstat (limited to 'drivers/serial/21285.c')
-rw-r--r-- | drivers/serial/21285.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/serial/21285.c b/drivers/serial/21285.c index 8681f1345056..d89aa38c5cf0 100644 --- a/drivers/serial/21285.c +++ b/drivers/serial/21285.c | |||
@@ -216,7 +216,7 @@ serial21285_set_termios(struct uart_port *port, struct ktermios *termios, | |||
216 | struct ktermios *old) | 216 | struct ktermios *old) |
217 | { | 217 | { |
218 | unsigned long flags; | 218 | unsigned long flags; |
219 | unsigned int baud, quot, h_lcr; | 219 | unsigned int baud, quot, h_lcr, b; |
220 | 220 | ||
221 | /* | 221 | /* |
222 | * We don't support modem control lines. | 222 | * We don't support modem control lines. |
@@ -234,12 +234,8 @@ serial21285_set_termios(struct uart_port *port, struct ktermios *termios, | |||
234 | */ | 234 | */ |
235 | baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16); | 235 | baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16); |
236 | quot = uart_get_divisor(port, baud); | 236 | quot = uart_get_divisor(port, baud); |
237 | 237 | b = port->uartclk / (16 * quot); | |
238 | if (port->state && port->state->port.tty) { | 238 | tty_termios_encode_baud_rate(termios, b, b); |
239 | struct tty_struct *tty = port->state->port.tty; | ||
240 | unsigned int b = port->uartclk / (16 * quot); | ||
241 | tty_encode_baud_rate(tty, b, b); | ||
242 | } | ||
243 | 239 | ||
244 | switch (termios->c_cflag & CSIZE) { | 240 | switch (termios->c_cflag & CSIZE) { |
245 | case CS5: | 241 | case CS5: |