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/keyspan.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/keyspan.c')
-rw-r--r-- | drivers/usb/serial/keyspan.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/serial/keyspan.c b/drivers/usb/serial/keyspan.c index a1b99243dac9..6225199119c0 100644 --- a/drivers/usb/serial/keyspan.c +++ b/drivers/usb/serial/keyspan.c | |||
@@ -158,7 +158,7 @@ static void keyspan_set_termios(struct tty_struct *tty, | |||
158 | 158 | ||
159 | p_priv = usb_get_serial_port_data(port); | 159 | p_priv = usb_get_serial_port_data(port); |
160 | d_details = p_priv->device_details; | 160 | d_details = p_priv->device_details; |
161 | cflag = tty->termios->c_cflag; | 161 | cflag = tty->termios.c_cflag; |
162 | device_port = port->number - port->serial->minor; | 162 | device_port = port->number - port->serial->minor; |
163 | 163 | ||
164 | /* Baud rate calculation takes baud rate as an integer | 164 | /* Baud rate calculation takes baud rate as an integer |
@@ -179,7 +179,7 @@ static void keyspan_set_termios(struct tty_struct *tty, | |||
179 | p_priv->flow_control = (cflag & CRTSCTS)? flow_cts: flow_none; | 179 | p_priv->flow_control = (cflag & CRTSCTS)? flow_cts: flow_none; |
180 | 180 | ||
181 | /* Mark/Space not supported */ | 181 | /* Mark/Space not supported */ |
182 | tty->termios->c_cflag &= ~CMSPAR; | 182 | tty->termios.c_cflag &= ~CMSPAR; |
183 | 183 | ||
184 | keyspan_send_setup(port, 0); | 184 | keyspan_send_setup(port, 0); |
185 | } | 185 | } |
@@ -1089,7 +1089,7 @@ static int keyspan_open(struct tty_struct *tty, struct usb_serial_port *port) | |||
1089 | 1089 | ||
1090 | device_port = port->number - port->serial->minor; | 1090 | device_port = port->number - port->serial->minor; |
1091 | if (tty) { | 1091 | if (tty) { |
1092 | cflag = tty->termios->c_cflag; | 1092 | cflag = tty->termios.c_cflag; |
1093 | /* Baud rate calculation takes baud rate as an integer | 1093 | /* Baud rate calculation takes baud rate as an integer |
1094 | so other rates can be generated if desired. */ | 1094 | so other rates can be generated if desired. */ |
1095 | baud_rate = tty_get_baud_rate(tty); | 1095 | baud_rate = tty_get_baud_rate(tty); |