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>
This commit is contained in:
Alan Cox
2012-07-14 15:31:47 +01:00
کامیت شده توسط Greg Kroah-Hartman
والد 6d31a88cb2
کامیت adc8d746ca
65فایلهای تغییر یافته به همراه408 افزوده شده و 434 حذف شده

مشاهده پرونده

@@ -158,7 +158,7 @@ static void keyspan_set_termios(struct tty_struct *tty,
p_priv = usb_get_serial_port_data(port);
d_details = p_priv->device_details;
cflag = tty->termios->c_cflag;
cflag = tty->termios.c_cflag;
device_port = port->number - port->serial->minor;
/* Baud rate calculation takes baud rate as an integer
@@ -179,7 +179,7 @@ static void keyspan_set_termios(struct tty_struct *tty,
p_priv->flow_control = (cflag & CRTSCTS)? flow_cts: flow_none;
/* Mark/Space not supported */
tty->termios->c_cflag &= ~CMSPAR;
tty->termios.c_cflag &= ~CMSPAR;
keyspan_send_setup(port, 0);
}
@@ -1089,7 +1089,7 @@ static int keyspan_open(struct tty_struct *tty, struct usb_serial_port *port)
device_port = port->number - port->serial->minor;
if (tty) {
cflag = tty->termios->c_cflag;
cflag = tty->termios.c_cflag;
/* Baud rate calculation takes baud rate as an integer
so other rates can be generated if desired. */
baud_rate = tty_get_baud_rate(tty);