aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/io_ti.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/io_ti.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/io_ti.c')
-rw-r--r--drivers/usb/serial/io_ti.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/usb/serial/io_ti.c b/drivers/usb/serial/io_ti.c
index 3936904c6419..765978ae752e 100644
--- a/drivers/usb/serial/io_ti.c
+++ b/drivers/usb/serial/io_ti.c
@@ -1870,7 +1870,7 @@ static int edge_open(struct tty_struct *tty, struct usb_serial_port *port)
1870 1870
1871 /* set up the port settings */ 1871 /* set up the port settings */
1872 if (tty) 1872 if (tty)
1873 edge_set_termios(tty, port, tty->termios); 1873 edge_set_termios(tty, port, &tty->termios);
1874 1874
1875 /* open up the port */ 1875 /* open up the port */
1876 1876
@@ -2272,13 +2272,13 @@ static void change_port_settings(struct tty_struct *tty,
2272 2272
2273 config = kmalloc (sizeof (*config), GFP_KERNEL); 2273 config = kmalloc (sizeof (*config), GFP_KERNEL);
2274 if (!config) { 2274 if (!config) {
2275 *tty->termios = *old_termios; 2275 tty->termios = *old_termios;
2276 dev_err(&edge_port->port->dev, "%s - out of memory\n", 2276 dev_err(&edge_port->port->dev, "%s - out of memory\n",
2277 __func__); 2277 __func__);
2278 return; 2278 return;
2279 } 2279 }
2280 2280
2281 cflag = tty->termios->c_cflag; 2281 cflag = tty->termios.c_cflag;
2282 2282
2283 config->wFlags = 0; 2283 config->wFlags = 0;
2284 2284
@@ -2362,7 +2362,7 @@ static void change_port_settings(struct tty_struct *tty,
2362 } else 2362 } else
2363 dbg("%s - OUTBOUND XON/XOFF is disabled", __func__); 2363 dbg("%s - OUTBOUND XON/XOFF is disabled", __func__);
2364 2364
2365 tty->termios->c_cflag &= ~CMSPAR; 2365 tty->termios.c_cflag &= ~CMSPAR;
2366 2366
2367 /* Round the baud rate */ 2367 /* Round the baud rate */
2368 baud = tty_get_baud_rate(tty); 2368 baud = tty_get_baud_rate(tty);
@@ -2408,10 +2408,10 @@ static void edge_set_termios(struct tty_struct *tty,
2408 struct edgeport_port *edge_port = usb_get_serial_port_data(port); 2408 struct edgeport_port *edge_port = usb_get_serial_port_data(port);
2409 unsigned int cflag; 2409 unsigned int cflag;
2410 2410
2411 cflag = tty->termios->c_cflag; 2411 cflag = tty->termios.c_cflag;
2412 2412
2413 dbg("%s - clfag %08x iflag %08x", __func__, 2413 dbg("%s - clfag %08x iflag %08x", __func__,
2414 tty->termios->c_cflag, tty->termios->c_iflag); 2414 tty->termios.c_cflag, tty->termios.c_iflag);
2415 dbg("%s - old clfag %08x old iflag %08x", __func__, 2415 dbg("%s - old clfag %08x old iflag %08x", __func__,
2416 old_termios->c_cflag, old_termios->c_iflag); 2416 old_termios->c_cflag, old_termios->c_iflag);
2417 dbg("%s - port %d", __func__, port->number); 2417 dbg("%s - port %d", __func__, port->number);