aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/spcp8x5.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/spcp8x5.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/spcp8x5.c')
-rw-r--r--drivers/usb/serial/spcp8x5.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/usb/serial/spcp8x5.c b/drivers/usb/serial/spcp8x5.c
index cad608984710..ab68a4d74d61 100644
--- a/drivers/usb/serial/spcp8x5.c
+++ b/drivers/usb/serial/spcp8x5.c
@@ -316,10 +316,10 @@ static void spcp8x5_dtr_rts(struct usb_serial_port *port, int on)
316static void spcp8x5_init_termios(struct tty_struct *tty) 316static void spcp8x5_init_termios(struct tty_struct *tty)
317{ 317{
318 /* for the 1st time call this function */ 318 /* for the 1st time call this function */
319 *(tty->termios) = tty_std_termios; 319 tty->termios = tty_std_termios;
320 tty->termios->c_cflag = B115200 | CS8 | CREAD | HUPCL | CLOCAL; 320 tty->termios.c_cflag = B115200 | CS8 | CREAD | HUPCL | CLOCAL;
321 tty->termios->c_ispeed = 115200; 321 tty->termios.c_ispeed = 115200;
322 tty->termios->c_ospeed = 115200; 322 tty->termios.c_ospeed = 115200;
323} 323}
324 324
325/* set the serial param for transfer. we should check if we really need to 325/* set the serial param for transfer. we should check if we really need to
@@ -330,7 +330,7 @@ static void spcp8x5_set_termios(struct tty_struct *tty,
330 struct usb_serial *serial = port->serial; 330 struct usb_serial *serial = port->serial;
331 struct spcp8x5_private *priv = usb_get_serial_port_data(port); 331 struct spcp8x5_private *priv = usb_get_serial_port_data(port);
332 unsigned long flags; 332 unsigned long flags;
333 unsigned int cflag = tty->termios->c_cflag; 333 unsigned int cflag = tty->termios.c_cflag;
334 unsigned int old_cflag = old_termios->c_cflag; 334 unsigned int old_cflag = old_termios->c_cflag;
335 unsigned short uartdata; 335 unsigned short uartdata;
336 unsigned char buf[2] = {0, 0}; 336 unsigned char buf[2] = {0, 0};
@@ -340,7 +340,7 @@ static void spcp8x5_set_termios(struct tty_struct *tty,
340 340
341 341
342 /* check that they really want us to change something */ 342 /* check that they really want us to change something */
343 if (!tty_termios_hw_change(tty->termios, old_termios)) 343 if (!tty_termios_hw_change(&tty->termios, old_termios))
344 return; 344 return;
345 345
346 /* set DTR/RTS active */ 346 /* set DTR/RTS active */