diff options
author | Alan Cox <alan@linux.intel.com> | 2012-07-14 10:31:47 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-07-16 16:00:41 -0400 |
commit | adc8d746caa67fff4b53ba3e5163a6cbacc3b523 (patch) | |
tree | e3f6c05f27c163b369ddd4da5f31d2a61bde6d3a /drivers/usb/serial/ti_usb_3410_5052.c | |
parent | 6d31a88cb2e01d46c0cb74aa5da529e1f92ae3db (diff) |
tty: move the termios object into the tty
This will let us sort out a whole pile of tty related races. The
alternative would be to keep points and refcount the termios objects.
However
1. They are tiny anyway
2. Many devices don't use the stored copies
3. We can remove a pty special case
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/serial/ti_usb_3410_5052.c')
-rw-r--r-- | drivers/usb/serial/ti_usb_3410_5052.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/usb/serial/ti_usb_3410_5052.c b/drivers/usb/serial/ti_usb_3410_5052.c index a4404f5ad68..f502a16aac2 100644 --- a/drivers/usb/serial/ti_usb_3410_5052.c +++ b/drivers/usb/serial/ti_usb_3410_5052.c | |||
@@ -520,7 +520,7 @@ static int ti_open(struct tty_struct *tty, struct usb_serial_port *port) | |||
520 | } | 520 | } |
521 | 521 | ||
522 | if (tty) | 522 | if (tty) |
523 | ti_set_termios(tty, port, tty->termios); | 523 | ti_set_termios(tty, port, &tty->termios); |
524 | 524 | ||
525 | dbg("%s - sending TI_OPEN_PORT", __func__); | 525 | dbg("%s - sending TI_OPEN_PORT", __func__); |
526 | status = ti_command_out_sync(tdev, TI_OPEN_PORT, | 526 | status = ti_command_out_sync(tdev, TI_OPEN_PORT, |
@@ -562,7 +562,7 @@ static int ti_open(struct tty_struct *tty, struct usb_serial_port *port) | |||
562 | usb_clear_halt(dev, port->read_urb->pipe); | 562 | usb_clear_halt(dev, port->read_urb->pipe); |
563 | 563 | ||
564 | if (tty) | 564 | if (tty) |
565 | ti_set_termios(tty, port, tty->termios); | 565 | ti_set_termios(tty, port, &tty->termios); |
566 | 566 | ||
567 | dbg("%s - sending TI_OPEN_PORT (2)", __func__); | 567 | dbg("%s - sending TI_OPEN_PORT (2)", __func__); |
568 | status = ti_command_out_sync(tdev, TI_OPEN_PORT, | 568 | status = ti_command_out_sync(tdev, TI_OPEN_PORT, |
@@ -831,8 +831,8 @@ static void ti_set_termios(struct tty_struct *tty, | |||
831 | int port_number = port->number - port->serial->minor; | 831 | int port_number = port->number - port->serial->minor; |
832 | unsigned int mcr; | 832 | unsigned int mcr; |
833 | 833 | ||
834 | cflag = tty->termios->c_cflag; | 834 | cflag = tty->termios.c_cflag; |
835 | iflag = tty->termios->c_iflag; | 835 | iflag = tty->termios.c_iflag; |
836 | 836 | ||
837 | dbg("%s - cflag %08x, iflag %08x", __func__, cflag, iflag); | 837 | dbg("%s - cflag %08x, iflag %08x", __func__, cflag, iflag); |
838 | dbg("%s - old clfag %08x, old iflag %08x", __func__, | 838 | dbg("%s - old clfag %08x, old iflag %08x", __func__, |
@@ -871,7 +871,7 @@ static void ti_set_termios(struct tty_struct *tty, | |||
871 | } | 871 | } |
872 | 872 | ||
873 | /* CMSPAR isn't supported by this driver */ | 873 | /* CMSPAR isn't supported by this driver */ |
874 | tty->termios->c_cflag &= ~CMSPAR; | 874 | tty->termios.c_cflag &= ~CMSPAR; |
875 | 875 | ||
876 | if (cflag & PARENB) { | 876 | if (cflag & PARENB) { |
877 | if (cflag & PARODD) { | 877 | if (cflag & PARODD) { |