diff options
author | Alan Cox <alan@linux.intel.com> | 2010-06-02 00:52:52 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-08-11 00:47:41 +0400 |
commit | eab4f5af6b07009d1fc48bac5f3215c0cbfb2fc3 (patch) | |
tree | e966fec1389f578bfcad82ba2e9ba831e93d815c /drivers/serial/max3100.c | |
parent | 192251352f912bccfb942ea35801d2357f11f592 (diff) | |
download | linux-eab4f5af6b07009d1fc48bac5f3215c0cbfb2fc3.tar.xz |
tty: serial - fix tty back references in termios
One or two drivers go poking back into the tty from the termios setting
routine in unsafe ways. We don't need to pass the tty down because the
[ab]users are just using it to get at things they can get at anyway.
This leaves low_latency setting to sort out along with set_ldisc use.
Signed-off-by: Alan Cox <alan@linux.intel.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/serial/max3100.c')
-rw-r--r-- | drivers/serial/max3100.c | 7 |
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, int baud = 0; unsigned cflag; u32 param_new, param_mask, parity = 0; - struct tty_struct *tty = s->port.state->port.tty; dev_dbg(&s->spi->dev, "%s\n", __func__); - if (!tty) - return; cflag = termios->c_cflag; param_new = 0; param_mask = 0; - baud = tty_get_baud_rate(tty); + baud = tty_termios_baud_rate(termios); param_new = s->conf & MAX3100_BAUD; switch (baud) { case 300: @@ -485,7 +482,7 @@ max3100_set_termios(struct uart_port *port, struct ktermios *termios, default: baud = s->baud; } - tty_encode_baud_rate(tty, baud, baud); + tty_termios_encode_baud_rate(termios, baud, baud); s->baud = baud; param_mask |= MAX3100_BAUD; |