diff options
Diffstat (limited to 'drivers/usb')
33 files changed, 137 insertions, 141 deletions
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c index f763ed7ba91e..ff7b5a8d501c 100644 --- a/drivers/usb/class/cdc-acm.c +++ b/drivers/usb/class/cdc-acm.c | |||
@@ -826,7 +826,7 @@ static void acm_tty_set_termios(struct tty_struct *tty, | |||
826 | struct ktermios *termios_old) | 826 | struct ktermios *termios_old) |
827 | { | 827 | { |
828 | struct acm *acm = tty->driver_data; | 828 | struct acm *acm = tty->driver_data; |
829 | struct ktermios *termios = tty->termios; | 829 | struct ktermios *termios = &tty->termios; |
830 | struct usb_cdc_line_coding newline; | 830 | struct usb_cdc_line_coding newline; |
831 | int newctrl = acm->ctrlout; | 831 | int newctrl = acm->ctrlout; |
832 | 832 | ||
@@ -1299,7 +1299,8 @@ skip_countries: | |||
1299 | usb_set_intfdata(data_interface, acm); | 1299 | usb_set_intfdata(data_interface, acm); |
1300 | 1300 | ||
1301 | usb_get_intf(control_interface); | 1301 | usb_get_intf(control_interface); |
1302 | tty_register_device(acm_tty_driver, minor, &control_interface->dev); | 1302 | tty_port_register_device(&acm->port, acm_tty_driver, minor, |
1303 | &control_interface->dev); | ||
1303 | 1304 | ||
1304 | return 0; | 1305 | return 0; |
1305 | alloc_fail7: | 1306 | alloc_fail7: |
diff --git a/drivers/usb/gadget/u_serial.c b/drivers/usb/gadget/u_serial.c index 5b3f5fffea92..2b5534c2ab84 100644 --- a/drivers/usb/gadget/u_serial.c +++ b/drivers/usb/gadget/u_serial.c | |||
@@ -1129,7 +1129,8 @@ int gserial_setup(struct usb_gadget *g, unsigned count) | |||
1129 | for (i = 0; i < count; i++) { | 1129 | for (i = 0; i < count; i++) { |
1130 | struct device *tty_dev; | 1130 | struct device *tty_dev; |
1131 | 1131 | ||
1132 | tty_dev = tty_register_device(gs_tty_driver, i, &g->dev); | 1132 | tty_dev = tty_port_register_device(&ports[i].port->port, |
1133 | gs_tty_driver, i, &g->dev); | ||
1133 | if (IS_ERR(tty_dev)) | 1134 | if (IS_ERR(tty_dev)) |
1134 | pr_warning("%s: no classdev for port %d, err %ld\n", | 1135 | pr_warning("%s: no classdev for port %d, err %ld\n", |
1135 | __func__, i, PTR_ERR(tty_dev)); | 1136 | __func__, i, PTR_ERR(tty_dev)); |
diff --git a/drivers/usb/serial/ark3116.c b/drivers/usb/serial/ark3116.c index f8ce97d8b0ad..3b98fb733362 100644 --- a/drivers/usb/serial/ark3116.c +++ b/drivers/usb/serial/ark3116.c | |||
@@ -215,7 +215,7 @@ static void ark3116_release(struct usb_serial *serial) | |||
215 | 215 | ||
216 | static void ark3116_init_termios(struct tty_struct *tty) | 216 | static void ark3116_init_termios(struct tty_struct *tty) |
217 | { | 217 | { |
218 | struct ktermios *termios = tty->termios; | 218 | struct ktermios *termios = &tty->termios; |
219 | *termios = tty_std_termios; | 219 | *termios = tty_std_termios; |
220 | termios->c_cflag = B9600 | CS8 | 220 | termios->c_cflag = B9600 | CS8 |
221 | | CREAD | HUPCL | CLOCAL; | 221 | | CREAD | HUPCL | CLOCAL; |
@@ -229,7 +229,7 @@ static void ark3116_set_termios(struct tty_struct *tty, | |||
229 | { | 229 | { |
230 | struct usb_serial *serial = port->serial; | 230 | struct usb_serial *serial = port->serial; |
231 | struct ark3116_private *priv = usb_get_serial_port_data(port); | 231 | struct ark3116_private *priv = usb_get_serial_port_data(port); |
232 | struct ktermios *termios = tty->termios; | 232 | struct ktermios *termios = &tty->termios; |
233 | unsigned int cflag = termios->c_cflag; | 233 | unsigned int cflag = termios->c_cflag; |
234 | int bps = tty_get_baud_rate(tty); | 234 | int bps = tty_get_baud_rate(tty); |
235 | int quot; | 235 | int quot; |
diff --git a/drivers/usb/serial/belkin_sa.c b/drivers/usb/serial/belkin_sa.c index 6b7365632951..a46df73ee96e 100644 --- a/drivers/usb/serial/belkin_sa.c +++ b/drivers/usb/serial/belkin_sa.c | |||
@@ -307,7 +307,7 @@ static void belkin_sa_set_termios(struct tty_struct *tty, | |||
307 | unsigned long control_state; | 307 | unsigned long control_state; |
308 | int bad_flow_control; | 308 | int bad_flow_control; |
309 | speed_t baud; | 309 | speed_t baud; |
310 | struct ktermios *termios = tty->termios; | 310 | struct ktermios *termios = &tty->termios; |
311 | 311 | ||
312 | iflag = termios->c_iflag; | 312 | iflag = termios->c_iflag; |
313 | cflag = termios->c_cflag; | 313 | cflag = termios->c_cflag; |
diff --git a/drivers/usb/serial/console.c b/drivers/usb/serial/console.c index b9cca6dcde07..9a564286bfd7 100644 --- a/drivers/usb/serial/console.c +++ b/drivers/usb/serial/console.c | |||
@@ -165,8 +165,8 @@ static int usb_console_setup(struct console *co, char *options) | |||
165 | } | 165 | } |
166 | 166 | ||
167 | if (serial->type->set_termios) { | 167 | if (serial->type->set_termios) { |
168 | tty->termios->c_cflag = cflag; | 168 | tty->termios.c_cflag = cflag; |
169 | tty_termios_encode_baud_rate(tty->termios, baud, baud); | 169 | tty_termios_encode_baud_rate(&tty->termios, baud, baud); |
170 | memset(&dummy, 0, sizeof(struct ktermios)); | 170 | memset(&dummy, 0, sizeof(struct ktermios)); |
171 | serial->type->set_termios(tty, port, &dummy); | 171 | serial->type->set_termios(tty, port, &dummy); |
172 | 172 | ||
diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c index 1e71079ce33b..ba5e07e188a0 100644 --- a/drivers/usb/serial/cp210x.c +++ b/drivers/usb/serial/cp210x.c | |||
@@ -469,7 +469,7 @@ static void cp210x_get_termios(struct tty_struct *tty, | |||
469 | 469 | ||
470 | if (tty) { | 470 | if (tty) { |
471 | cp210x_get_termios_port(tty->driver_data, | 471 | cp210x_get_termios_port(tty->driver_data, |
472 | &tty->termios->c_cflag, &baud); | 472 | &tty->termios.c_cflag, &baud); |
473 | tty_encode_baud_rate(tty, baud, baud); | 473 | tty_encode_baud_rate(tty, baud, baud); |
474 | } | 474 | } |
475 | 475 | ||
@@ -631,7 +631,7 @@ static void cp210x_change_speed(struct tty_struct *tty, | |||
631 | { | 631 | { |
632 | u32 baud; | 632 | u32 baud; |
633 | 633 | ||
634 | baud = tty->termios->c_ospeed; | 634 | baud = tty->termios.c_ospeed; |
635 | 635 | ||
636 | /* This maps the requested rate to a rate valid on cp2102 or cp2103, | 636 | /* This maps the requested rate to a rate valid on cp2102 or cp2103, |
637 | * or to an arbitrary rate in [1M,2M]. | 637 | * or to an arbitrary rate in [1M,2M]. |
@@ -665,10 +665,10 @@ static void cp210x_set_termios(struct tty_struct *tty, | |||
665 | if (!tty) | 665 | if (!tty) |
666 | return; | 666 | return; |
667 | 667 | ||
668 | cflag = tty->termios->c_cflag; | 668 | cflag = tty->termios.c_cflag; |
669 | old_cflag = old_termios->c_cflag; | 669 | old_cflag = old_termios->c_cflag; |
670 | 670 | ||
671 | if (tty->termios->c_ospeed != old_termios->c_ospeed) | 671 | if (tty->termios.c_ospeed != old_termios->c_ospeed) |
672 | cp210x_change_speed(tty, port, old_termios); | 672 | cp210x_change_speed(tty, port, old_termios); |
673 | 673 | ||
674 | /* If the number of data bits is to be updated */ | 674 | /* If the number of data bits is to be updated */ |
diff --git a/drivers/usb/serial/cypress_m8.c b/drivers/usb/serial/cypress_m8.c index b78c34eb5d3f..be34f153e566 100644 --- a/drivers/usb/serial/cypress_m8.c +++ b/drivers/usb/serial/cypress_m8.c | |||
@@ -922,38 +922,38 @@ static void cypress_set_termios(struct tty_struct *tty, | |||
922 | early enough */ | 922 | early enough */ |
923 | if (!priv->termios_initialized) { | 923 | if (!priv->termios_initialized) { |
924 | if (priv->chiptype == CT_EARTHMATE) { | 924 | if (priv->chiptype == CT_EARTHMATE) { |
925 | *(tty->termios) = tty_std_termios; | 925 | tty->termios = tty_std_termios; |
926 | tty->termios->c_cflag = B4800 | CS8 | CREAD | HUPCL | | 926 | tty->termios.c_cflag = B4800 | CS8 | CREAD | HUPCL | |
927 | CLOCAL; | 927 | CLOCAL; |
928 | tty->termios->c_ispeed = 4800; | 928 | tty->termios.c_ispeed = 4800; |
929 | tty->termios->c_ospeed = 4800; | 929 | tty->termios.c_ospeed = 4800; |
930 | } else if (priv->chiptype == CT_CYPHIDCOM) { | 930 | } else if (priv->chiptype == CT_CYPHIDCOM) { |
931 | *(tty->termios) = tty_std_termios; | 931 | tty->termios = tty_std_termios; |
932 | tty->termios->c_cflag = B9600 | CS8 | CREAD | HUPCL | | 932 | tty->termios.c_cflag = B9600 | CS8 | CREAD | HUPCL | |
933 | CLOCAL; | 933 | CLOCAL; |
934 | tty->termios->c_ispeed = 9600; | 934 | tty->termios.c_ispeed = 9600; |
935 | tty->termios->c_ospeed = 9600; | 935 | tty->termios.c_ospeed = 9600; |
936 | } else if (priv->chiptype == CT_CA42V2) { | 936 | } else if (priv->chiptype == CT_CA42V2) { |
937 | *(tty->termios) = tty_std_termios; | 937 | tty->termios = tty_std_termios; |
938 | tty->termios->c_cflag = B9600 | CS8 | CREAD | HUPCL | | 938 | tty->termios.c_cflag = B9600 | CS8 | CREAD | HUPCL | |
939 | CLOCAL; | 939 | CLOCAL; |
940 | tty->termios->c_ispeed = 9600; | 940 | tty->termios.c_ispeed = 9600; |
941 | tty->termios->c_ospeed = 9600; | 941 | tty->termios.c_ospeed = 9600; |
942 | } | 942 | } |
943 | priv->termios_initialized = 1; | 943 | priv->termios_initialized = 1; |
944 | } | 944 | } |
945 | spin_unlock_irqrestore(&priv->lock, flags); | 945 | spin_unlock_irqrestore(&priv->lock, flags); |
946 | 946 | ||
947 | /* Unsupported features need clearing */ | 947 | /* Unsupported features need clearing */ |
948 | tty->termios->c_cflag &= ~(CMSPAR|CRTSCTS); | 948 | tty->termios.c_cflag &= ~(CMSPAR|CRTSCTS); |
949 | 949 | ||
950 | cflag = tty->termios->c_cflag; | 950 | cflag = tty->termios.c_cflag; |
951 | iflag = tty->termios->c_iflag; | 951 | iflag = tty->termios.c_iflag; |
952 | 952 | ||
953 | /* check if there are new settings */ | 953 | /* check if there are new settings */ |
954 | if (old_termios) { | 954 | if (old_termios) { |
955 | spin_lock_irqsave(&priv->lock, flags); | 955 | spin_lock_irqsave(&priv->lock, flags); |
956 | priv->tmp_termios = *(tty->termios); | 956 | priv->tmp_termios = tty->termios; |
957 | spin_unlock_irqrestore(&priv->lock, flags); | 957 | spin_unlock_irqrestore(&priv->lock, flags); |
958 | } | 958 | } |
959 | 959 | ||
@@ -1021,7 +1021,7 @@ static void cypress_set_termios(struct tty_struct *tty, | |||
1021 | "4800bps."); | 1021 | "4800bps."); |
1022 | /* define custom termios settings for NMEA protocol */ | 1022 | /* define custom termios settings for NMEA protocol */ |
1023 | 1023 | ||
1024 | tty->termios->c_iflag /* input modes - */ | 1024 | tty->termios.c_iflag /* input modes - */ |
1025 | &= ~(IGNBRK /* disable ignore break */ | 1025 | &= ~(IGNBRK /* disable ignore break */ |
1026 | | BRKINT /* disable break causes interrupt */ | 1026 | | BRKINT /* disable break causes interrupt */ |
1027 | | PARMRK /* disable mark parity errors */ | 1027 | | PARMRK /* disable mark parity errors */ |
@@ -1031,10 +1031,10 @@ static void cypress_set_termios(struct tty_struct *tty, | |||
1031 | | ICRNL /* disable translate CR to NL */ | 1031 | | ICRNL /* disable translate CR to NL */ |
1032 | | IXON); /* disable enable XON/XOFF flow control */ | 1032 | | IXON); /* disable enable XON/XOFF flow control */ |
1033 | 1033 | ||
1034 | tty->termios->c_oflag /* output modes */ | 1034 | tty->termios.c_oflag /* output modes */ |
1035 | &= ~OPOST; /* disable postprocess output char */ | 1035 | &= ~OPOST; /* disable postprocess output char */ |
1036 | 1036 | ||
1037 | tty->termios->c_lflag /* line discipline modes */ | 1037 | tty->termios.c_lflag /* line discipline modes */ |
1038 | &= ~(ECHO /* disable echo input characters */ | 1038 | &= ~(ECHO /* disable echo input characters */ |
1039 | | ECHONL /* disable echo new line */ | 1039 | | ECHONL /* disable echo new line */ |
1040 | | ICANON /* disable erase, kill, werase, and rprnt | 1040 | | ICANON /* disable erase, kill, werase, and rprnt |
@@ -1200,7 +1200,7 @@ static void cypress_read_int_callback(struct urb *urb) | |||
1200 | 1200 | ||
1201 | /* hangup, as defined in acm.c... this might be a bad place for it | 1201 | /* hangup, as defined in acm.c... this might be a bad place for it |
1202 | * though */ | 1202 | * though */ |
1203 | if (tty && !(tty->termios->c_cflag & CLOCAL) && | 1203 | if (tty && !(tty->termios.c_cflag & CLOCAL) && |
1204 | !(priv->current_status & UART_CD)) { | 1204 | !(priv->current_status & UART_CD)) { |
1205 | dbg("%s - calling hangup", __func__); | 1205 | dbg("%s - calling hangup", __func__); |
1206 | tty_hangup(tty); | 1206 | tty_hangup(tty); |
diff --git a/drivers/usb/serial/digi_acceleport.c b/drivers/usb/serial/digi_acceleport.c index b5cd838093ef..afd9d2ec577b 100644 --- a/drivers/usb/serial/digi_acceleport.c +++ b/drivers/usb/serial/digi_acceleport.c | |||
@@ -687,8 +687,8 @@ static void digi_set_termios(struct tty_struct *tty, | |||
687 | struct usb_serial_port *port, struct ktermios *old_termios) | 687 | struct usb_serial_port *port, struct ktermios *old_termios) |
688 | { | 688 | { |
689 | struct digi_port *priv = usb_get_serial_port_data(port); | 689 | struct digi_port *priv = usb_get_serial_port_data(port); |
690 | unsigned int iflag = tty->termios->c_iflag; | 690 | unsigned int iflag = tty->termios.c_iflag; |
691 | unsigned int cflag = tty->termios->c_cflag; | 691 | unsigned int cflag = tty->termios.c_cflag; |
692 | unsigned int old_iflag = old_termios->c_iflag; | 692 | unsigned int old_iflag = old_termios->c_iflag; |
693 | unsigned int old_cflag = old_termios->c_cflag; | 693 | unsigned int old_cflag = old_termios->c_cflag; |
694 | unsigned char buf[32]; | 694 | unsigned char buf[32]; |
@@ -709,7 +709,7 @@ static void digi_set_termios(struct tty_struct *tty, | |||
709 | /* don't set RTS if using hardware flow control */ | 709 | /* don't set RTS if using hardware flow control */ |
710 | /* and throttling input */ | 710 | /* and throttling input */ |
711 | modem_signals = TIOCM_DTR; | 711 | modem_signals = TIOCM_DTR; |
712 | if (!(tty->termios->c_cflag & CRTSCTS) || | 712 | if (!(tty->termios.c_cflag & CRTSCTS) || |
713 | !test_bit(TTY_THROTTLED, &tty->flags)) | 713 | !test_bit(TTY_THROTTLED, &tty->flags)) |
714 | modem_signals |= TIOCM_RTS; | 714 | modem_signals |= TIOCM_RTS; |
715 | digi_set_modem_signals(port, modem_signals, 1); | 715 | digi_set_modem_signals(port, modem_signals, 1); |
@@ -748,7 +748,7 @@ static void digi_set_termios(struct tty_struct *tty, | |||
748 | } | 748 | } |
749 | } | 749 | } |
750 | /* set parity */ | 750 | /* set parity */ |
751 | tty->termios->c_cflag &= ~CMSPAR; | 751 | tty->termios.c_cflag &= ~CMSPAR; |
752 | 752 | ||
753 | if ((cflag&(PARENB|PARODD)) != (old_cflag&(PARENB|PARODD))) { | 753 | if ((cflag&(PARENB|PARODD)) != (old_cflag&(PARENB|PARODD))) { |
754 | if (cflag&PARENB) { | 754 | if (cflag&PARENB) { |
@@ -1124,8 +1124,8 @@ static int digi_open(struct tty_struct *tty, struct usb_serial_port *port) | |||
1124 | 1124 | ||
1125 | /* set termios settings */ | 1125 | /* set termios settings */ |
1126 | if (tty) { | 1126 | if (tty) { |
1127 | not_termios.c_cflag = ~tty->termios->c_cflag; | 1127 | not_termios.c_cflag = ~tty->termios.c_cflag; |
1128 | not_termios.c_iflag = ~tty->termios->c_iflag; | 1128 | not_termios.c_iflag = ~tty->termios.c_iflag; |
1129 | digi_set_termios(tty, port, ¬_termios); | 1129 | digi_set_termios(tty, port, ¬_termios); |
1130 | } | 1130 | } |
1131 | return 0; | 1131 | return 0; |
@@ -1500,7 +1500,7 @@ static int digi_read_oob_callback(struct urb *urb) | |||
1500 | 1500 | ||
1501 | rts = 0; | 1501 | rts = 0; |
1502 | if (tty) | 1502 | if (tty) |
1503 | rts = tty->termios->c_cflag & CRTSCTS; | 1503 | rts = tty->termios.c_cflag & CRTSCTS; |
1504 | 1504 | ||
1505 | if (tty && opcode == DIGI_CMD_READ_INPUT_SIGNALS) { | 1505 | if (tty && opcode == DIGI_CMD_READ_INPUT_SIGNALS) { |
1506 | spin_lock(&priv->dp_port_lock); | 1506 | spin_lock(&priv->dp_port_lock); |
diff --git a/drivers/usb/serial/empeg.c b/drivers/usb/serial/empeg.c index cdf61dd07318..34e86383090a 100644 --- a/drivers/usb/serial/empeg.c +++ b/drivers/usb/serial/empeg.c | |||
@@ -87,7 +87,7 @@ static int empeg_startup(struct usb_serial *serial) | |||
87 | 87 | ||
88 | static void empeg_init_termios(struct tty_struct *tty) | 88 | static void empeg_init_termios(struct tty_struct *tty) |
89 | { | 89 | { |
90 | struct ktermios *termios = tty->termios; | 90 | struct ktermios *termios = &tty->termios; |
91 | 91 | ||
92 | /* | 92 | /* |
93 | * The empeg-car player wants these particular tty settings. | 93 | * The empeg-car player wants these particular tty settings. |
diff --git a/drivers/usb/serial/f81232.c b/drivers/usb/serial/f81232.c index 499b15fd82f1..79451ee12ca0 100644 --- a/drivers/usb/serial/f81232.c +++ b/drivers/usb/serial/f81232.c | |||
@@ -173,10 +173,11 @@ static void f81232_set_termios(struct tty_struct *tty, | |||
173 | /* FIXME - Stubbed out for now */ | 173 | /* FIXME - Stubbed out for now */ |
174 | 174 | ||
175 | /* Don't change anything if nothing has changed */ | 175 | /* Don't change anything if nothing has changed */ |
176 | if (!tty_termios_hw_change(tty->termios, old_termios)) | 176 | if (!tty_termios_hw_change(&tty->termios, old_termios)) |
177 | return; | 177 | return; |
178 | 178 | ||
179 | /* Do the real work here... */ | 179 | /* Do the real work here... */ |
180 | tty_termios_copy_hw(&tty->termios, old_termios); | ||
180 | } | 181 | } |
181 | 182 | ||
182 | static int f81232_tiocmget(struct tty_struct *tty) | 183 | static int f81232_tiocmget(struct tty_struct *tty) |
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index 5620db6469e5..24e3e19849a2 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c | |||
@@ -2082,7 +2082,7 @@ static void ftdi_set_termios(struct tty_struct *tty, | |||
2082 | { | 2082 | { |
2083 | struct usb_device *dev = port->serial->dev; | 2083 | struct usb_device *dev = port->serial->dev; |
2084 | struct ftdi_private *priv = usb_get_serial_port_data(port); | 2084 | struct ftdi_private *priv = usb_get_serial_port_data(port); |
2085 | struct ktermios *termios = tty->termios; | 2085 | struct ktermios *termios = &tty->termios; |
2086 | unsigned int cflag = termios->c_cflag; | 2086 | unsigned int cflag = termios->c_cflag; |
2087 | __u16 urb_value; /* will hold the new flags */ | 2087 | __u16 urb_value; /* will hold the new flags */ |
2088 | 2088 | ||
diff --git a/drivers/usb/serial/io_edgeport.c b/drivers/usb/serial/io_edgeport.c index e1f5ccd1e8f8..f435575c4e6e 100644 --- a/drivers/usb/serial/io_edgeport.c +++ b/drivers/usb/serial/io_edgeport.c | |||
@@ -1458,7 +1458,7 @@ static void edge_throttle(struct tty_struct *tty) | |||
1458 | } | 1458 | } |
1459 | 1459 | ||
1460 | /* if we are implementing RTS/CTS, toggle that line */ | 1460 | /* if we are implementing RTS/CTS, toggle that line */ |
1461 | if (tty->termios->c_cflag & CRTSCTS) { | 1461 | if (tty->termios.c_cflag & CRTSCTS) { |
1462 | edge_port->shadowMCR &= ~MCR_RTS; | 1462 | edge_port->shadowMCR &= ~MCR_RTS; |
1463 | status = send_cmd_write_uart_register(edge_port, MCR, | 1463 | status = send_cmd_write_uart_register(edge_port, MCR, |
1464 | edge_port->shadowMCR); | 1464 | edge_port->shadowMCR); |
@@ -1497,7 +1497,7 @@ static void edge_unthrottle(struct tty_struct *tty) | |||
1497 | return; | 1497 | return; |
1498 | } | 1498 | } |
1499 | /* if we are implementing RTS/CTS, toggle that line */ | 1499 | /* if we are implementing RTS/CTS, toggle that line */ |
1500 | if (tty->termios->c_cflag & CRTSCTS) { | 1500 | if (tty->termios.c_cflag & CRTSCTS) { |
1501 | edge_port->shadowMCR |= MCR_RTS; | 1501 | edge_port->shadowMCR |= MCR_RTS; |
1502 | send_cmd_write_uart_register(edge_port, MCR, | 1502 | send_cmd_write_uart_register(edge_port, MCR, |
1503 | edge_port->shadowMCR); | 1503 | edge_port->shadowMCR); |
@@ -1516,9 +1516,9 @@ static void edge_set_termios(struct tty_struct *tty, | |||
1516 | struct edgeport_port *edge_port = usb_get_serial_port_data(port); | 1516 | struct edgeport_port *edge_port = usb_get_serial_port_data(port); |
1517 | unsigned int cflag; | 1517 | unsigned int cflag; |
1518 | 1518 | ||
1519 | cflag = tty->termios->c_cflag; | 1519 | cflag = tty->termios.c_cflag; |
1520 | dbg("%s - clfag %08x iflag %08x", __func__, | 1520 | dbg("%s - clfag %08x iflag %08x", __func__, |
1521 | tty->termios->c_cflag, tty->termios->c_iflag); | 1521 | tty->termios.c_cflag, tty->termios.c_iflag); |
1522 | dbg("%s - old clfag %08x old iflag %08x", __func__, | 1522 | dbg("%s - old clfag %08x old iflag %08x", __func__, |
1523 | old_termios->c_cflag, old_termios->c_iflag); | 1523 | old_termios->c_cflag, old_termios->c_iflag); |
1524 | 1524 | ||
@@ -1987,7 +1987,7 @@ static void process_rcvd_status(struct edgeport_serial *edge_serial, | |||
1987 | tty = tty_port_tty_get(&edge_port->port->port); | 1987 | tty = tty_port_tty_get(&edge_port->port->port); |
1988 | if (tty) { | 1988 | if (tty) { |
1989 | change_port_settings(tty, | 1989 | change_port_settings(tty, |
1990 | edge_port, tty->termios); | 1990 | edge_port, &tty->termios); |
1991 | tty_kref_put(tty); | 1991 | tty_kref_put(tty); |
1992 | } | 1992 | } |
1993 | 1993 | ||
@@ -2570,7 +2570,7 @@ static void change_port_settings(struct tty_struct *tty, | |||
2570 | return; | 2570 | return; |
2571 | } | 2571 | } |
2572 | 2572 | ||
2573 | cflag = tty->termios->c_cflag; | 2573 | cflag = tty->termios.c_cflag; |
2574 | 2574 | ||
2575 | switch (cflag & CSIZE) { | 2575 | switch (cflag & CSIZE) { |
2576 | case CS5: | 2576 | case CS5: |
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); |
diff --git a/drivers/usb/serial/ir-usb.c b/drivers/usb/serial/ir-usb.c index fc09414c960f..5a96692b12a2 100644 --- a/drivers/usb/serial/ir-usb.c +++ b/drivers/usb/serial/ir-usb.c | |||
@@ -381,7 +381,7 @@ static void ir_set_termios(struct tty_struct *tty, | |||
381 | ir_xbof = ir_xbof_change(xbof) ; | 381 | ir_xbof = ir_xbof_change(xbof) ; |
382 | 382 | ||
383 | /* Only speed changes are supported */ | 383 | /* Only speed changes are supported */ |
384 | tty_termios_copy_hw(tty->termios, old_termios); | 384 | tty_termios_copy_hw(&tty->termios, old_termios); |
385 | tty_encode_baud_rate(tty, baud, baud); | 385 | tty_encode_baud_rate(tty, baud, baud); |
386 | 386 | ||
387 | /* | 387 | /* |
diff --git a/drivers/usb/serial/iuu_phoenix.c b/drivers/usb/serial/iuu_phoenix.c index 22b1eb5040b7..bf3864045c18 100644 --- a/drivers/usb/serial/iuu_phoenix.c +++ b/drivers/usb/serial/iuu_phoenix.c | |||
@@ -921,7 +921,7 @@ static void iuu_set_termios(struct tty_struct *tty, | |||
921 | { | 921 | { |
922 | const u32 supported_mask = CMSPAR|PARENB|PARODD; | 922 | const u32 supported_mask = CMSPAR|PARENB|PARODD; |
923 | struct iuu_private *priv = usb_get_serial_port_data(port); | 923 | struct iuu_private *priv = usb_get_serial_port_data(port); |
924 | unsigned int cflag = tty->termios->c_cflag; | 924 | unsigned int cflag = tty->termios.c_cflag; |
925 | int status; | 925 | int status; |
926 | u32 actual; | 926 | u32 actual; |
927 | u32 parity; | 927 | u32 parity; |
@@ -930,7 +930,7 @@ static void iuu_set_termios(struct tty_struct *tty, | |||
930 | u32 newval = cflag & supported_mask; | 930 | u32 newval = cflag & supported_mask; |
931 | 931 | ||
932 | /* Just use the ospeed. ispeed should be the same. */ | 932 | /* Just use the ospeed. ispeed should be the same. */ |
933 | baud = tty->termios->c_ospeed; | 933 | baud = tty->termios.c_ospeed; |
934 | 934 | ||
935 | dbg("%s - enter c_ospeed or baud=%d", __func__, baud); | 935 | dbg("%s - enter c_ospeed or baud=%d", __func__, baud); |
936 | 936 | ||
@@ -961,13 +961,13 @@ static void iuu_set_termios(struct tty_struct *tty, | |||
961 | * settings back over and then adjust them | 961 | * settings back over and then adjust them |
962 | */ | 962 | */ |
963 | if (old_termios) | 963 | if (old_termios) |
964 | tty_termios_copy_hw(tty->termios, old_termios); | 964 | tty_termios_copy_hw(&tty->termios, old_termios); |
965 | if (status != 0) /* Set failed - return old bits */ | 965 | if (status != 0) /* Set failed - return old bits */ |
966 | return; | 966 | return; |
967 | /* Re-encode speed, parity and csize */ | 967 | /* Re-encode speed, parity and csize */ |
968 | tty_encode_baud_rate(tty, baud, baud); | 968 | tty_encode_baud_rate(tty, baud, baud); |
969 | tty->termios->c_cflag &= ~(supported_mask|CSIZE); | 969 | tty->termios.c_cflag &= ~(supported_mask|CSIZE); |
970 | tty->termios->c_cflag |= newval | csize; | 970 | tty->termios.c_cflag |= newval | csize; |
971 | } | 971 | } |
972 | 972 | ||
973 | static void iuu_close(struct usb_serial_port *port) | 973 | static void iuu_close(struct usb_serial_port *port) |
@@ -993,14 +993,14 @@ static void iuu_close(struct usb_serial_port *port) | |||
993 | 993 | ||
994 | static void iuu_init_termios(struct tty_struct *tty) | 994 | static void iuu_init_termios(struct tty_struct *tty) |
995 | { | 995 | { |
996 | *(tty->termios) = tty_std_termios; | 996 | tty->termios = tty_std_termios; |
997 | tty->termios->c_cflag = CLOCAL | CREAD | CS8 | B9600 | 997 | tty->termios.c_cflag = CLOCAL | CREAD | CS8 | B9600 |
998 | | TIOCM_CTS | CSTOPB | PARENB; | 998 | | TIOCM_CTS | CSTOPB | PARENB; |
999 | tty->termios->c_ispeed = 9600; | 999 | tty->termios.c_ispeed = 9600; |
1000 | tty->termios->c_ospeed = 9600; | 1000 | tty->termios.c_ospeed = 9600; |
1001 | tty->termios->c_lflag = 0; | 1001 | tty->termios.c_lflag = 0; |
1002 | tty->termios->c_oflag = 0; | 1002 | tty->termios.c_oflag = 0; |
1003 | tty->termios->c_iflag = 0; | 1003 | tty->termios.c_iflag = 0; |
1004 | } | 1004 | } |
1005 | 1005 | ||
1006 | static int iuu_open(struct tty_struct *tty, struct usb_serial_port *port) | 1006 | static int iuu_open(struct tty_struct *tty, struct usb_serial_port *port) |
@@ -1012,8 +1012,8 @@ static int iuu_open(struct tty_struct *tty, struct usb_serial_port *port) | |||
1012 | u32 actual; | 1012 | u32 actual; |
1013 | struct iuu_private *priv = usb_get_serial_port_data(port); | 1013 | struct iuu_private *priv = usb_get_serial_port_data(port); |
1014 | 1014 | ||
1015 | baud = tty->termios->c_ospeed; | 1015 | baud = tty->termios.c_ospeed; |
1016 | tty->termios->c_ispeed = baud; | 1016 | tty->termios.c_ispeed = baud; |
1017 | /* Re-encode speed */ | 1017 | /* Re-encode speed */ |
1018 | tty_encode_baud_rate(tty, baud, baud); | 1018 | tty_encode_baud_rate(tty, baud, baud); |
1019 | 1019 | ||
diff --git a/drivers/usb/serial/keyspan.c b/drivers/usb/serial/keyspan.c index af0b70eaf032..7bcbb47e1449 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 | } |
@@ -1086,7 +1086,7 @@ static int keyspan_open(struct tty_struct *tty, struct usb_serial_port *port) | |||
1086 | 1086 | ||
1087 | device_port = port->number - port->serial->minor; | 1087 | device_port = port->number - port->serial->minor; |
1088 | if (tty) { | 1088 | if (tty) { |
1089 | cflag = tty->termios->c_cflag; | 1089 | cflag = tty->termios.c_cflag; |
1090 | /* Baud rate calculation takes baud rate as an integer | 1090 | /* Baud rate calculation takes baud rate as an integer |
1091 | so other rates can be generated if desired. */ | 1091 | so other rates can be generated if desired. */ |
1092 | baud_rate = tty_get_baud_rate(tty); | 1092 | baud_rate = tty_get_baud_rate(tty); |
diff --git a/drivers/usb/serial/keyspan_pda.c b/drivers/usb/serial/keyspan_pda.c index a4ac3cfeffc4..dcada8615fcf 100644 --- a/drivers/usb/serial/keyspan_pda.c +++ b/drivers/usb/serial/keyspan_pda.c | |||
@@ -338,7 +338,7 @@ static void keyspan_pda_set_termios(struct tty_struct *tty, | |||
338 | 7[EOMS]1: 10 bit, b0/b7 is parity | 338 | 7[EOMS]1: 10 bit, b0/b7 is parity |
339 | 7[EOMS]2: 11 bit, b0/b7 is parity, extra bit always (mark?) | 339 | 7[EOMS]2: 11 bit, b0/b7 is parity, extra bit always (mark?) |
340 | 340 | ||
341 | HW flow control is dictated by the tty->termios->c_cflags & CRTSCTS | 341 | HW flow control is dictated by the tty->termios.c_cflags & CRTSCTS |
342 | bit. | 342 | bit. |
343 | 343 | ||
344 | For now, just do baud. */ | 344 | For now, just do baud. */ |
@@ -353,7 +353,7 @@ static void keyspan_pda_set_termios(struct tty_struct *tty, | |||
353 | } | 353 | } |
354 | /* Only speed can change so copy the old h/w parameters | 354 | /* Only speed can change so copy the old h/w parameters |
355 | then encode the new speed */ | 355 | then encode the new speed */ |
356 | tty_termios_copy_hw(tty->termios, old_termios); | 356 | tty_termios_copy_hw(&tty->termios, old_termios); |
357 | tty_encode_baud_rate(tty, speed, speed); | 357 | tty_encode_baud_rate(tty, speed, speed); |
358 | } | 358 | } |
359 | 359 | ||
diff --git a/drivers/usb/serial/kl5kusb105.c b/drivers/usb/serial/kl5kusb105.c index 5bed59cd5776..def9ad258715 100644 --- a/drivers/usb/serial/kl5kusb105.c +++ b/drivers/usb/serial/kl5kusb105.c | |||
@@ -311,12 +311,12 @@ static int klsi_105_open(struct tty_struct *tty, struct usb_serial_port *port) | |||
311 | 311 | ||
312 | /* set up termios structure */ | 312 | /* set up termios structure */ |
313 | spin_lock_irqsave(&priv->lock, flags); | 313 | spin_lock_irqsave(&priv->lock, flags); |
314 | priv->termios.c_iflag = tty->termios->c_iflag; | 314 | priv->termios.c_iflag = tty->termios.c_iflag; |
315 | priv->termios.c_oflag = tty->termios->c_oflag; | 315 | priv->termios.c_oflag = tty->termios.c_oflag; |
316 | priv->termios.c_cflag = tty->termios->c_cflag; | 316 | priv->termios.c_cflag = tty->termios.c_cflag; |
317 | priv->termios.c_lflag = tty->termios->c_lflag; | 317 | priv->termios.c_lflag = tty->termios.c_lflag; |
318 | for (i = 0; i < NCCS; i++) | 318 | for (i = 0; i < NCCS; i++) |
319 | priv->termios.c_cc[i] = tty->termios->c_cc[i]; | 319 | priv->termios.c_cc[i] = tty->termios.c_cc[i]; |
320 | priv->cfg.pktlen = cfg->pktlen; | 320 | priv->cfg.pktlen = cfg->pktlen; |
321 | priv->cfg.baudrate = cfg->baudrate; | 321 | priv->cfg.baudrate = cfg->baudrate; |
322 | priv->cfg.databits = cfg->databits; | 322 | priv->cfg.databits = cfg->databits; |
@@ -445,9 +445,9 @@ static void klsi_105_set_termios(struct tty_struct *tty, | |||
445 | struct ktermios *old_termios) | 445 | struct ktermios *old_termios) |
446 | { | 446 | { |
447 | struct klsi_105_private *priv = usb_get_serial_port_data(port); | 447 | struct klsi_105_private *priv = usb_get_serial_port_data(port); |
448 | unsigned int iflag = tty->termios->c_iflag; | 448 | unsigned int iflag = tty->termios.c_iflag; |
449 | unsigned int old_iflag = old_termios->c_iflag; | 449 | unsigned int old_iflag = old_termios->c_iflag; |
450 | unsigned int cflag = tty->termios->c_cflag; | 450 | unsigned int cflag = tty->termios.c_cflag; |
451 | unsigned int old_cflag = old_termios->c_cflag; | 451 | unsigned int old_cflag = old_termios->c_cflag; |
452 | struct klsi_105_port_settings *cfg; | 452 | struct klsi_105_port_settings *cfg; |
453 | unsigned long flags; | 453 | unsigned long flags; |
@@ -560,7 +560,7 @@ static void klsi_105_set_termios(struct tty_struct *tty, | |||
560 | if ((cflag & (PARENB|PARODD)) != (old_cflag & (PARENB|PARODD)) | 560 | if ((cflag & (PARENB|PARODD)) != (old_cflag & (PARENB|PARODD)) |
561 | || (cflag & CSTOPB) != (old_cflag & CSTOPB)) { | 561 | || (cflag & CSTOPB) != (old_cflag & CSTOPB)) { |
562 | /* Not currently supported */ | 562 | /* Not currently supported */ |
563 | tty->termios->c_cflag &= ~(PARENB|PARODD|CSTOPB); | 563 | tty->termios.c_cflag &= ~(PARENB|PARODD|CSTOPB); |
564 | #if 0 | 564 | #if 0 |
565 | priv->last_lcr = 0; | 565 | priv->last_lcr = 0; |
566 | 566 | ||
@@ -587,7 +587,7 @@ static void klsi_105_set_termios(struct tty_struct *tty, | |||
587 | || (iflag & IXON) != (old_iflag & IXON) | 587 | || (iflag & IXON) != (old_iflag & IXON) |
588 | || (cflag & CRTSCTS) != (old_cflag & CRTSCTS)) { | 588 | || (cflag & CRTSCTS) != (old_cflag & CRTSCTS)) { |
589 | /* Not currently supported */ | 589 | /* Not currently supported */ |
590 | tty->termios->c_cflag &= ~CRTSCTS; | 590 | tty->termios.c_cflag &= ~CRTSCTS; |
591 | /* Drop DTR/RTS if no flow control otherwise assert */ | 591 | /* Drop DTR/RTS if no flow control otherwise assert */ |
592 | #if 0 | 592 | #if 0 |
593 | if ((iflag & IXOFF) || (iflag & IXON) || (cflag & CRTSCTS)) | 593 | if ((iflag & IXOFF) || (iflag & IXON) || (cflag & CRTSCTS)) |
diff --git a/drivers/usb/serial/kobil_sct.c b/drivers/usb/serial/kobil_sct.c index fafeabb64c55..bf5c74965d34 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) | |||
191 | static void kobil_init_termios(struct tty_struct *tty) | 191 | static 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_iflag &= ~(ISIG | ICANON | ECHO | IEXTEN | XCASE); |
196 | tty->termios->c_iflag = IGNBRK | IGNPAR | IXOFF; | 196 | tty->termios.c_iflag |= 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 | ||
201 | static int kobil_open(struct tty_struct *tty, struct usb_serial_port *port) | 201 | static 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_copy_hw(&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, |
diff --git a/drivers/usb/serial/mct_u232.c b/drivers/usb/serial/mct_u232.c index a71fa0aa0406..df98cffdba65 100644 --- a/drivers/usb/serial/mct_u232.c +++ b/drivers/usb/serial/mct_u232.c | |||
@@ -454,7 +454,7 @@ static int mct_u232_open(struct tty_struct *tty, struct usb_serial_port *port) | |||
454 | * either. | 454 | * either. |
455 | */ | 455 | */ |
456 | spin_lock_irqsave(&priv->lock, flags); | 456 | spin_lock_irqsave(&priv->lock, flags); |
457 | if (tty && (tty->termios->c_cflag & CBAUD)) | 457 | if (tty && (tty->termios.c_cflag & CBAUD)) |
458 | priv->control_state = TIOCM_DTR | TIOCM_RTS; | 458 | priv->control_state = TIOCM_DTR | TIOCM_RTS; |
459 | else | 459 | else |
460 | priv->control_state = 0; | 460 | priv->control_state = 0; |
@@ -634,7 +634,7 @@ static void mct_u232_set_termios(struct tty_struct *tty, | |||
634 | { | 634 | { |
635 | struct usb_serial *serial = port->serial; | 635 | struct usb_serial *serial = port->serial; |
636 | struct mct_u232_private *priv = usb_get_serial_port_data(port); | 636 | struct mct_u232_private *priv = usb_get_serial_port_data(port); |
637 | struct ktermios *termios = tty->termios; | 637 | struct ktermios *termios = &tty->termios; |
638 | unsigned int cflag = termios->c_cflag; | 638 | unsigned int cflag = termios->c_cflag; |
639 | unsigned int old_cflag = old_termios->c_cflag; | 639 | unsigned int old_cflag = old_termios->c_cflag; |
640 | unsigned long flags; | 640 | unsigned long flags; |
diff --git a/drivers/usb/serial/metro-usb.c b/drivers/usb/serial/metro-usb.c index d47eb06fe463..2b0627b5fe2c 100644 --- a/drivers/usb/serial/metro-usb.c +++ b/drivers/usb/serial/metro-usb.c | |||
@@ -130,12 +130,6 @@ static void metrousb_read_int_callback(struct urb *urb) | |||
130 | 130 | ||
131 | /* Set the data read from the usb port into the serial port buffer. */ | 131 | /* Set the data read from the usb port into the serial port buffer. */ |
132 | tty = tty_port_tty_get(&port->port); | 132 | tty = tty_port_tty_get(&port->port); |
133 | if (!tty) { | ||
134 | dev_err(&port->dev, "%s - bad tty pointer - exiting\n", | ||
135 | __func__); | ||
136 | return; | ||
137 | } | ||
138 | |||
139 | if (tty && urb->actual_length) { | 133 | if (tty && urb->actual_length) { |
140 | /* Loop through the data copying each byte to the tty layer. */ | 134 | /* Loop through the data copying each byte to the tty layer. */ |
141 | tty_insert_flip_string(tty, data, urb->actual_length); | 135 | tty_insert_flip_string(tty, data, urb->actual_length); |
diff --git a/drivers/usb/serial/mos7720.c b/drivers/usb/serial/mos7720.c index a07dd3c8cfef..012f67b2e4cc 100644 --- a/drivers/usb/serial/mos7720.c +++ b/drivers/usb/serial/mos7720.c | |||
@@ -1349,7 +1349,7 @@ static void mos7720_throttle(struct tty_struct *tty) | |||
1349 | } | 1349 | } |
1350 | 1350 | ||
1351 | /* if we are implementing RTS/CTS, toggle that line */ | 1351 | /* if we are implementing RTS/CTS, toggle that line */ |
1352 | if (tty->termios->c_cflag & CRTSCTS) { | 1352 | if (tty->termios.c_cflag & CRTSCTS) { |
1353 | mos7720_port->shadowMCR &= ~UART_MCR_RTS; | 1353 | mos7720_port->shadowMCR &= ~UART_MCR_RTS; |
1354 | write_mos_reg(port->serial, port->number - port->serial->minor, | 1354 | write_mos_reg(port->serial, port->number - port->serial->minor, |
1355 | MCR, mos7720_port->shadowMCR); | 1355 | MCR, mos7720_port->shadowMCR); |
@@ -1383,7 +1383,7 @@ static void mos7720_unthrottle(struct tty_struct *tty) | |||
1383 | } | 1383 | } |
1384 | 1384 | ||
1385 | /* if we are implementing RTS/CTS, toggle that line */ | 1385 | /* if we are implementing RTS/CTS, toggle that line */ |
1386 | if (tty->termios->c_cflag & CRTSCTS) { | 1386 | if (tty->termios.c_cflag & CRTSCTS) { |
1387 | mos7720_port->shadowMCR |= UART_MCR_RTS; | 1387 | mos7720_port->shadowMCR |= UART_MCR_RTS; |
1388 | write_mos_reg(port->serial, port->number - port->serial->minor, | 1388 | write_mos_reg(port->serial, port->number - port->serial->minor, |
1389 | MCR, mos7720_port->shadowMCR); | 1389 | MCR, mos7720_port->shadowMCR); |
@@ -1604,8 +1604,8 @@ static void change_port_settings(struct tty_struct *tty, | |||
1604 | lStop = 0x00; /* 1 stop bit */ | 1604 | lStop = 0x00; /* 1 stop bit */ |
1605 | lParity = 0x00; /* No parity */ | 1605 | lParity = 0x00; /* No parity */ |
1606 | 1606 | ||
1607 | cflag = tty->termios->c_cflag; | 1607 | cflag = tty->termios.c_cflag; |
1608 | iflag = tty->termios->c_iflag; | 1608 | iflag = tty->termios.c_iflag; |
1609 | 1609 | ||
1610 | /* Change the number of bits */ | 1610 | /* Change the number of bits */ |
1611 | switch (cflag & CSIZE) { | 1611 | switch (cflag & CSIZE) { |
@@ -1753,11 +1753,11 @@ static void mos7720_set_termios(struct tty_struct *tty, | |||
1753 | 1753 | ||
1754 | dbg("%s\n", "setting termios - ASPIRE"); | 1754 | dbg("%s\n", "setting termios - ASPIRE"); |
1755 | 1755 | ||
1756 | cflag = tty->termios->c_cflag; | 1756 | cflag = tty->termios.c_cflag; |
1757 | 1757 | ||
1758 | dbg("%s - cflag %08x iflag %08x", __func__, | 1758 | dbg("%s - cflag %08x iflag %08x", __func__, |
1759 | tty->termios->c_cflag, | 1759 | tty->termios.c_cflag, |
1760 | RELEVANT_IFLAG(tty->termios->c_iflag)); | 1760 | RELEVANT_IFLAG(tty->termios.c_iflag)); |
1761 | 1761 | ||
1762 | dbg("%s - old cflag %08x old iflag %08x", __func__, | 1762 | dbg("%s - old cflag %08x old iflag %08x", __func__, |
1763 | old_termios->c_cflag, | 1763 | old_termios->c_cflag, |
diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c index 2f6da1e89bfa..402c32d7accb 100644 --- a/drivers/usb/serial/mos7840.c +++ b/drivers/usb/serial/mos7840.c | |||
@@ -1651,7 +1651,7 @@ static void mos7840_throttle(struct tty_struct *tty) | |||
1651 | return; | 1651 | return; |
1652 | } | 1652 | } |
1653 | /* if we are implementing RTS/CTS, toggle that line */ | 1653 | /* if we are implementing RTS/CTS, toggle that line */ |
1654 | if (tty->termios->c_cflag & CRTSCTS) { | 1654 | if (tty->termios.c_cflag & CRTSCTS) { |
1655 | mos7840_port->shadowMCR &= ~MCR_RTS; | 1655 | mos7840_port->shadowMCR &= ~MCR_RTS; |
1656 | status = mos7840_set_uart_reg(port, MODEM_CONTROL_REGISTER, | 1656 | status = mos7840_set_uart_reg(port, MODEM_CONTROL_REGISTER, |
1657 | mos7840_port->shadowMCR); | 1657 | mos7840_port->shadowMCR); |
@@ -1694,7 +1694,7 @@ static void mos7840_unthrottle(struct tty_struct *tty) | |||
1694 | } | 1694 | } |
1695 | 1695 | ||
1696 | /* if we are implementing RTS/CTS, toggle that line */ | 1696 | /* if we are implementing RTS/CTS, toggle that line */ |
1697 | if (tty->termios->c_cflag & CRTSCTS) { | 1697 | if (tty->termios.c_cflag & CRTSCTS) { |
1698 | mos7840_port->shadowMCR |= MCR_RTS; | 1698 | mos7840_port->shadowMCR |= MCR_RTS; |
1699 | status = mos7840_set_uart_reg(port, MODEM_CONTROL_REGISTER, | 1699 | status = mos7840_set_uart_reg(port, MODEM_CONTROL_REGISTER, |
1700 | mos7840_port->shadowMCR); | 1700 | mos7840_port->shadowMCR); |
@@ -2000,8 +2000,8 @@ static void mos7840_change_port_settings(struct tty_struct *tty, | |||
2000 | lStop = LCR_STOP_1; | 2000 | lStop = LCR_STOP_1; |
2001 | lParity = LCR_PAR_NONE; | 2001 | lParity = LCR_PAR_NONE; |
2002 | 2002 | ||
2003 | cflag = tty->termios->c_cflag; | 2003 | cflag = tty->termios.c_cflag; |
2004 | iflag = tty->termios->c_iflag; | 2004 | iflag = tty->termios.c_iflag; |
2005 | 2005 | ||
2006 | /* Change the number of bits */ | 2006 | /* Change the number of bits */ |
2007 | if (cflag & CSIZE) { | 2007 | if (cflag & CSIZE) { |
@@ -2161,10 +2161,10 @@ static void mos7840_set_termios(struct tty_struct *tty, | |||
2161 | 2161 | ||
2162 | dbg("%s", "setting termios - "); | 2162 | dbg("%s", "setting termios - "); |
2163 | 2163 | ||
2164 | cflag = tty->termios->c_cflag; | 2164 | cflag = tty->termios.c_cflag; |
2165 | 2165 | ||
2166 | dbg("%s - clfag %08x iflag %08x", __func__, | 2166 | dbg("%s - clfag %08x iflag %08x", __func__, |
2167 | tty->termios->c_cflag, RELEVANT_IFLAG(tty->termios->c_iflag)); | 2167 | tty->termios.c_cflag, RELEVANT_IFLAG(tty->termios.c_iflag)); |
2168 | dbg("%s - old clfag %08x old iflag %08x", __func__, | 2168 | dbg("%s - old clfag %08x old iflag %08x", __func__, |
2169 | old_termios->c_cflag, RELEVANT_IFLAG(old_termios->c_iflag)); | 2169 | old_termios->c_cflag, RELEVANT_IFLAG(old_termios->c_iflag)); |
2170 | dbg("%s - port %d", __func__, port->number); | 2170 | dbg("%s - port %d", __func__, port->number); |
diff --git a/drivers/usb/serial/oti6858.c b/drivers/usb/serial/oti6858.c index 5976b65ab6ee..9f555560bfbf 100644 --- a/drivers/usb/serial/oti6858.c +++ b/drivers/usb/serial/oti6858.c | |||
@@ -404,10 +404,10 @@ static int oti6858_chars_in_buffer(struct tty_struct *tty) | |||
404 | 404 | ||
405 | static void oti6858_init_termios(struct tty_struct *tty) | 405 | static void oti6858_init_termios(struct tty_struct *tty) |
406 | { | 406 | { |
407 | *(tty->termios) = tty_std_termios; | 407 | tty->termios = tty_std_termios; |
408 | tty->termios->c_cflag = B38400 | CS8 | CREAD | HUPCL | CLOCAL; | 408 | tty->termios.c_cflag = B38400 | CS8 | CREAD | HUPCL | CLOCAL; |
409 | tty->termios->c_ispeed = 38400; | 409 | tty->termios.c_ispeed = 38400; |
410 | tty->termios->c_ospeed = 38400; | 410 | tty->termios.c_ospeed = 38400; |
411 | } | 411 | } |
412 | 412 | ||
413 | static void oti6858_set_termios(struct tty_struct *tty, | 413 | static void oti6858_set_termios(struct tty_struct *tty, |
@@ -425,7 +425,7 @@ static void oti6858_set_termios(struct tty_struct *tty, | |||
425 | return; | 425 | return; |
426 | } | 426 | } |
427 | 427 | ||
428 | cflag = tty->termios->c_cflag; | 428 | cflag = tty->termios.c_cflag; |
429 | 429 | ||
430 | spin_lock_irqsave(&priv->lock, flags); | 430 | spin_lock_irqsave(&priv->lock, flags); |
431 | divisor = priv->pending_setup.divisor; | 431 | divisor = priv->pending_setup.divisor; |
diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c index 13b8dd6481f5..2b9108a8ea64 100644 --- a/drivers/usb/serial/pl2303.c +++ b/drivers/usb/serial/pl2303.c | |||
@@ -260,16 +260,16 @@ static void pl2303_set_termios(struct tty_struct *tty, | |||
260 | serial settings even to the same values as before. Thus | 260 | serial settings even to the same values as before. Thus |
261 | we actually need to filter in this specific case */ | 261 | we actually need to filter in this specific case */ |
262 | 262 | ||
263 | if (!tty_termios_hw_change(tty->termios, old_termios)) | 263 | if (!tty_termios_hw_change(&tty->termios, old_termios)) |
264 | return; | 264 | return; |
265 | 265 | ||
266 | cflag = tty->termios->c_cflag; | 266 | cflag = tty->termios.c_cflag; |
267 | 267 | ||
268 | buf = kzalloc(7, GFP_KERNEL); | 268 | buf = kzalloc(7, GFP_KERNEL); |
269 | if (!buf) { | 269 | if (!buf) { |
270 | dev_err(&port->dev, "%s - out of memory.\n", __func__); | 270 | dev_err(&port->dev, "%s - out of memory.\n", __func__); |
271 | /* Report back no change occurred */ | 271 | /* Report back no change occurred */ |
272 | *tty->termios = *old_termios; | 272 | tty->termios = *old_termios; |
273 | return; | 273 | return; |
274 | } | 274 | } |
275 | 275 | ||
diff --git a/drivers/usb/serial/quatech2.c b/drivers/usb/serial/quatech2.c index 151670b6b72a..7df9cdb053ed 100644 --- a/drivers/usb/serial/quatech2.c +++ b/drivers/usb/serial/quatech2.c | |||
@@ -275,7 +275,7 @@ static void qt2_set_termios(struct tty_struct *tty, | |||
275 | { | 275 | { |
276 | struct usb_device *dev = port->serial->dev; | 276 | struct usb_device *dev = port->serial->dev; |
277 | struct qt2_port_private *port_priv; | 277 | struct qt2_port_private *port_priv; |
278 | struct ktermios *termios = tty->termios; | 278 | struct ktermios *termios = &tty->termios; |
279 | u16 baud; | 279 | u16 baud; |
280 | unsigned int cflag = termios->c_cflag; | 280 | unsigned int cflag = termios->c_cflag; |
281 | u16 new_lcr = 0; | 281 | u16 new_lcr = 0; |
@@ -406,7 +406,7 @@ static int qt2_open(struct tty_struct *tty, struct usb_serial_port *port) | |||
406 | port_priv->device_port = (u8) device_port; | 406 | port_priv->device_port = (u8) device_port; |
407 | 407 | ||
408 | if (tty) | 408 | if (tty) |
409 | qt2_set_termios(tty, port, tty->termios); | 409 | qt2_set_termios(tty, port, &tty->termios); |
410 | 410 | ||
411 | return 0; | 411 | return 0; |
412 | 412 | ||
diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c index 0274710cced5..b14ebbd73567 100644 --- a/drivers/usb/serial/sierra.c +++ b/drivers/usb/serial/sierra.c | |||
@@ -382,7 +382,7 @@ static int sierra_send_setup(struct usb_serial_port *port) | |||
382 | static void sierra_set_termios(struct tty_struct *tty, | 382 | static void sierra_set_termios(struct tty_struct *tty, |
383 | struct usb_serial_port *port, struct ktermios *old_termios) | 383 | struct usb_serial_port *port, struct ktermios *old_termios) |
384 | { | 384 | { |
385 | tty_termios_copy_hw(tty->termios, old_termios); | 385 | tty_termios_copy_hw(&tty->termios, old_termios); |
386 | sierra_send_setup(port); | 386 | sierra_send_setup(port); |
387 | } | 387 | } |
388 | 388 | ||
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) | |||
316 | static void spcp8x5_init_termios(struct tty_struct *tty) | 316 | static 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 */ |
diff --git a/drivers/usb/serial/ssu100.c b/drivers/usb/serial/ssu100.c index 3fee23bf0c14..cf2d30cf7588 100644 --- a/drivers/usb/serial/ssu100.c +++ b/drivers/usb/serial/ssu100.c | |||
@@ -216,7 +216,7 @@ static void ssu100_set_termios(struct tty_struct *tty, | |||
216 | struct ktermios *old_termios) | 216 | struct ktermios *old_termios) |
217 | { | 217 | { |
218 | struct usb_device *dev = port->serial->dev; | 218 | struct usb_device *dev = port->serial->dev; |
219 | struct ktermios *termios = tty->termios; | 219 | struct ktermios *termios = &tty->termios; |
220 | u16 baud, divisor, remainder; | 220 | u16 baud, divisor, remainder; |
221 | unsigned int cflag = termios->c_cflag; | 221 | unsigned int cflag = termios->c_cflag; |
222 | u16 urb_value = 0; /* will hold the new flags */ | 222 | u16 urb_value = 0; /* will hold the new flags */ |
@@ -322,7 +322,7 @@ static int ssu100_open(struct tty_struct *tty, struct usb_serial_port *port) | |||
322 | dbg("%s - set uart failed", __func__); | 322 | dbg("%s - set uart failed", __func__); |
323 | 323 | ||
324 | if (tty) | 324 | if (tty) |
325 | ssu100_set_termios(tty, port, tty->termios); | 325 | ssu100_set_termios(tty, port, &tty->termios); |
326 | 326 | ||
327 | return usb_serial_generic_open(tty, port); | 327 | return usb_serial_generic_open(tty, port); |
328 | } | 328 | } |
diff --git a/drivers/usb/serial/ti_usb_3410_5052.c b/drivers/usb/serial/ti_usb_3410_5052.c index a4404f5ad68e..f502a16aac21 100644 --- a/drivers/usb/serial/ti_usb_3410_5052.c +++ b/drivers/usb/serial/ti_usb_3410_5052.c | |||
@@ -520,7 +520,7 @@ static int ti_open(struct tty_struct *tty, struct usb_serial_port *port) | |||
520 | } | 520 | } |
521 | 521 | ||
522 | if (tty) | 522 | if (tty) |
523 | ti_set_termios(tty, port, tty->termios); | 523 | ti_set_termios(tty, port, &tty->termios); |
524 | 524 | ||
525 | dbg("%s - sending TI_OPEN_PORT", __func__); | 525 | dbg("%s - sending TI_OPEN_PORT", __func__); |
526 | status = ti_command_out_sync(tdev, TI_OPEN_PORT, | 526 | status = ti_command_out_sync(tdev, TI_OPEN_PORT, |
@@ -562,7 +562,7 @@ static int ti_open(struct tty_struct *tty, struct usb_serial_port *port) | |||
562 | usb_clear_halt(dev, port->read_urb->pipe); | 562 | usb_clear_halt(dev, port->read_urb->pipe); |
563 | 563 | ||
564 | if (tty) | 564 | if (tty) |
565 | ti_set_termios(tty, port, tty->termios); | 565 | ti_set_termios(tty, port, &tty->termios); |
566 | 566 | ||
567 | dbg("%s - sending TI_OPEN_PORT (2)", __func__); | 567 | dbg("%s - sending TI_OPEN_PORT (2)", __func__); |
568 | status = ti_command_out_sync(tdev, TI_OPEN_PORT, | 568 | status = ti_command_out_sync(tdev, TI_OPEN_PORT, |
@@ -831,8 +831,8 @@ static void ti_set_termios(struct tty_struct *tty, | |||
831 | int port_number = port->number - port->serial->minor; | 831 | int port_number = port->number - port->serial->minor; |
832 | unsigned int mcr; | 832 | unsigned int mcr; |
833 | 833 | ||
834 | cflag = tty->termios->c_cflag; | 834 | cflag = tty->termios.c_cflag; |
835 | iflag = tty->termios->c_iflag; | 835 | iflag = tty->termios.c_iflag; |
836 | 836 | ||
837 | dbg("%s - cflag %08x, iflag %08x", __func__, cflag, iflag); | 837 | dbg("%s - cflag %08x, iflag %08x", __func__, cflag, iflag); |
838 | dbg("%s - old clfag %08x, old iflag %08x", __func__, | 838 | dbg("%s - old clfag %08x, old iflag %08x", __func__, |
@@ -871,7 +871,7 @@ static void ti_set_termios(struct tty_struct *tty, | |||
871 | } | 871 | } |
872 | 872 | ||
873 | /* CMSPAR isn't supported by this driver */ | 873 | /* CMSPAR isn't supported by this driver */ |
874 | tty->termios->c_cflag &= ~CMSPAR; | 874 | tty->termios.c_cflag &= ~CMSPAR; |
875 | 875 | ||
876 | if (cflag & PARENB) { | 876 | if (cflag & PARENB) { |
877 | if (cflag & PARODD) { | 877 | if (cflag & PARODD) { |
diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c index 27483f91a4a3..aa4b0d775992 100644 --- a/drivers/usb/serial/usb-serial.c +++ b/drivers/usb/serial/usb-serial.c | |||
@@ -207,7 +207,7 @@ static int serial_install(struct tty_driver *driver, struct tty_struct *tty) | |||
207 | if (retval) | 207 | if (retval) |
208 | goto error_get_interface; | 208 | goto error_get_interface; |
209 | 209 | ||
210 | retval = tty_standard_install(driver, tty); | 210 | retval = tty_port_install(&port->port, driver, tty); |
211 | if (retval) | 211 | if (retval) |
212 | goto error_init_termios; | 212 | goto error_init_termios; |
213 | 213 | ||
@@ -305,8 +305,7 @@ static void serial_close(struct tty_struct *tty, struct file *filp) | |||
305 | * Do the resource freeing and refcount dropping for the port. | 305 | * Do the resource freeing and refcount dropping for the port. |
306 | * Avoid freeing the console. | 306 | * Avoid freeing the console. |
307 | * | 307 | * |
308 | * Called asynchronously after the last tty kref is dropped, | 308 | * Called asynchronously after the last tty kref is dropped. |
309 | * and the tty layer has already done the tty_shutdown(tty); | ||
310 | */ | 309 | */ |
311 | static void serial_cleanup(struct tty_struct *tty) | 310 | static void serial_cleanup(struct tty_struct *tty) |
312 | { | 311 | { |
@@ -423,7 +422,7 @@ static void serial_set_termios(struct tty_struct *tty, struct ktermios *old) | |||
423 | if (port->serial->type->set_termios) | 422 | if (port->serial->type->set_termios) |
424 | port->serial->type->set_termios(tty, port, old); | 423 | port->serial->type->set_termios(tty, port, old); |
425 | else | 424 | else |
426 | tty_termios_copy_hw(tty->termios, old); | 425 | tty_termios_copy_hw(&tty->termios, old); |
427 | } | 426 | } |
428 | 427 | ||
429 | static int serial_break(struct tty_struct *tty, int break_state) | 428 | static int serial_break(struct tty_struct *tty, int break_state) |
diff --git a/drivers/usb/serial/usb_wwan.c b/drivers/usb/serial/usb_wwan.c index 6855d5ed0331..72b678d90831 100644 --- a/drivers/usb/serial/usb_wwan.c +++ b/drivers/usb/serial/usb_wwan.c | |||
@@ -67,7 +67,7 @@ void usb_wwan_set_termios(struct tty_struct *tty, | |||
67 | struct usb_wwan_intf_private *intfdata = port->serial->private; | 67 | struct usb_wwan_intf_private *intfdata = port->serial->private; |
68 | 68 | ||
69 | /* Doesn't support option setting */ | 69 | /* Doesn't support option setting */ |
70 | tty_termios_copy_hw(tty->termios, old_termios); | 70 | tty_termios_copy_hw(&tty->termios, old_termios); |
71 | 71 | ||
72 | if (intfdata->send_setup) | 72 | if (intfdata->send_setup) |
73 | intfdata->send_setup(port); | 73 | intfdata->send_setup(port); |
diff --git a/drivers/usb/serial/whiteheat.c b/drivers/usb/serial/whiteheat.c index 473635e7f5db..b36077de72b9 100644 --- a/drivers/usb/serial/whiteheat.c +++ b/drivers/usb/serial/whiteheat.c | |||
@@ -724,7 +724,7 @@ static void firm_setup_port(struct tty_struct *tty) | |||
724 | { | 724 | { |
725 | struct usb_serial_port *port = tty->driver_data; | 725 | struct usb_serial_port *port = tty->driver_data; |
726 | struct whiteheat_port_settings port_settings; | 726 | struct whiteheat_port_settings port_settings; |
727 | unsigned int cflag = tty->termios->c_cflag; | 727 | unsigned int cflag = tty->termios.c_cflag; |
728 | 728 | ||
729 | port_settings.port = port->number + 1; | 729 | port_settings.port = port->number + 1; |
730 | 730 | ||