aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/cypress_m8.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/serial/cypress_m8.c')
-rw-r--r--drivers/usb/serial/cypress_m8.c40
1 files changed, 20 insertions, 20 deletions
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);