aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial/max3100.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/serial/max3100.c')
-rw-r--r--drivers/serial/max3100.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/serial/max3100.c b/drivers/serial/max3100.c
index 3351c3bd59e4..beb1afa27d8d 100644
--- a/drivers/serial/max3100.c
+++ b/drivers/serial/max3100.c
@@ -430,17 +430,14 @@ max3100_set_termios(struct uart_port *port, struct ktermios *termios,
430 int baud = 0; 430 int baud = 0;
431 unsigned cflag; 431 unsigned cflag;
432 u32 param_new, param_mask, parity = 0; 432 u32 param_new, param_mask, parity = 0;
433 struct tty_struct *tty = s->port.state->port.tty;
434 433
435 dev_dbg(&s->spi->dev, "%s\n", __func__); 434 dev_dbg(&s->spi->dev, "%s\n", __func__);
436 if (!tty)
437 return;
438 435
439 cflag = termios->c_cflag; 436 cflag = termios->c_cflag;
440 param_new = 0; 437 param_new = 0;
441 param_mask = 0; 438 param_mask = 0;
442 439
443 baud = tty_get_baud_rate(tty); 440 baud = tty_termios_baud_rate(termios);
444 param_new = s->conf & MAX3100_BAUD; 441 param_new = s->conf & MAX3100_BAUD;
445 switch (baud) { 442 switch (baud) {
446 case 300: 443 case 300:
@@ -485,7 +482,7 @@ max3100_set_termios(struct uart_port *port, struct ktermios *termios,
485 default: 482 default:
486 baud = s->baud; 483 baud = s->baud;
487 } 484 }
488 tty_encode_baud_rate(tty, baud, baud); 485 tty_termios_encode_baud_rate(termios, baud, baud);
489 s->baud = baud; 486 s->baud = baud;
490 param_mask |= MAX3100_BAUD; 487 param_mask |= MAX3100_BAUD;
491 488