aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/kobil_sct.c
diff options
context:
space:
mode:
authorAlan Cox <alan@linux.intel.com>2012-07-14 10:31:47 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-07-16 16:00:41 -0400
commitadc8d746caa67fff4b53ba3e5163a6cbacc3b523 (patch)
treee3f6c05f27c163b369ddd4da5f31d2a61bde6d3a /drivers/usb/serial/kobil_sct.c
parent6d31a88cb2e01d46c0cb74aa5da529e1f92ae3db (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/kobil_sct.c')
-rw-r--r--drivers/usb/serial/kobil_sct.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/usb/serial/kobil_sct.c b/drivers/usb/serial/kobil_sct.c
index fafeabb64c55..0516a9661e2f 100644
--- a/drivers/usb/serial/kobil_sct.c
+++ b/drivers/usb/serial/kobil_sct.c
@@ -191,11 +191,11 @@ static void kobil_release(struct usb_serial *serial)
191static void kobil_init_termios(struct tty_struct *tty) 191static void kobil_init_termios(struct tty_struct *tty)
192{ 192{
193 /* Default to echo off and other sane device settings */ 193 /* Default to echo off and other sane device settings */
194 tty->termios->c_lflag = 0; 194 tty->termios.c_lflag = 0;
195 tty->termios->c_lflag &= ~(ISIG | ICANON | ECHO | IEXTEN | XCASE); 195 tty->termios.c_lflag &= ~(ISIG | ICANON | ECHO | IEXTEN | XCASE);
196 tty->termios->c_iflag = IGNBRK | IGNPAR | IXOFF; 196 tty->termios.c_lflag = IGNBRK | IGNPAR | IXOFF;
197 /* do NOT translate CR to CR-NL (0x0A -> 0x0A 0x0D) */ 197 /* do NOT translate CR to CR-NL (0x0A -> 0x0A 0x0D) */
198 tty->termios->c_oflag &= ~ONLCR; 198 tty->termios.c_oflag &= ~ONLCR;
199} 199}
200 200
201static int kobil_open(struct tty_struct *tty, struct usb_serial_port *port) 201static int kobil_open(struct tty_struct *tty, struct usb_serial_port *port)
@@ -581,14 +581,14 @@ static void kobil_set_termios(struct tty_struct *tty,
581 struct kobil_private *priv; 581 struct kobil_private *priv;
582 int result; 582 int result;
583 unsigned short urb_val = 0; 583 unsigned short urb_val = 0;
584 int c_cflag = tty->termios->c_cflag; 584 int c_cflag = tty->termios.c_cflag;
585 speed_t speed; 585 speed_t speed;
586 586
587 priv = usb_get_serial_port_data(port); 587 priv = usb_get_serial_port_data(port);
588 if (priv->device_type == KOBIL_USBTWIN_PRODUCT_ID || 588 if (priv->device_type == KOBIL_USBTWIN_PRODUCT_ID ||
589 priv->device_type == KOBIL_KAAN_SIM_PRODUCT_ID) { 589 priv->device_type == KOBIL_KAAN_SIM_PRODUCT_ID) {
590 /* This device doesn't support ioctl calls */ 590 /* This device doesn't support ioctl calls */
591 *tty->termios = *old; 591 tty->termios = *old;
592 return; 592 return;
593 } 593 }
594 594
@@ -612,7 +612,7 @@ static void kobil_set_termios(struct tty_struct *tty,
612 urb_val |= SUSBCR_SPASB_EvenParity; 612 urb_val |= SUSBCR_SPASB_EvenParity;
613 } else 613 } else
614 urb_val |= SUSBCR_SPASB_NoParity; 614 urb_val |= SUSBCR_SPASB_NoParity;
615 tty->termios->c_cflag &= ~CMSPAR; 615 tty->termios.c_cflag &= ~CMSPAR;
616 tty_encode_baud_rate(tty, speed, speed); 616 tty_encode_baud_rate(tty, speed, speed);
617 617
618 result = usb_control_msg(port->serial->dev, 618 result = usb_control_msg(port->serial->dev,