diff options
-rw-r--r-- | drivers/usb/serial/mos7720.c | 28 |
1 files changed, 8 insertions, 20 deletions
diff --git a/drivers/usb/serial/mos7720.c b/drivers/usb/serial/mos7720.c index e02c198016b0..725991fadc26 100644 --- a/drivers/usb/serial/mos7720.c +++ b/drivers/usb/serial/mos7720.c | |||
@@ -1040,11 +1040,6 @@ static void change_port_settings(struct moschip_port *mos7720_port, | |||
1040 | 1040 | ||
1041 | tty = mos7720_port->port->tty; | 1041 | tty = mos7720_port->port->tty; |
1042 | 1042 | ||
1043 | if ((!tty) || (!tty->termios)) { | ||
1044 | dbg("%s - no tty structures", __FUNCTION__); | ||
1045 | return; | ||
1046 | } | ||
1047 | |||
1048 | dbg("%s: Entering ..........", __FUNCTION__); | 1043 | dbg("%s: Entering ..........", __FUNCTION__); |
1049 | 1044 | ||
1050 | lData = UART_LCR_WLEN8; | 1045 | lData = UART_LCR_WLEN8; |
@@ -1175,7 +1170,10 @@ static void change_port_settings(struct moschip_port *mos7720_port, | |||
1175 | 1170 | ||
1176 | dbg("%s - baud rate = %d", __FUNCTION__, baud); | 1171 | dbg("%s - baud rate = %d", __FUNCTION__, baud); |
1177 | status = send_cmd_write_baud_rate(mos7720_port, baud); | 1172 | status = send_cmd_write_baud_rate(mos7720_port, baud); |
1178 | 1173 | /* FIXME: needs to write actual resulting baud back not just | |
1174 | blindly do so */ | ||
1175 | if (cflag & CBAUD) | ||
1176 | tty_encode_baud_rate(tty, baud, baud); | ||
1179 | /* Enable Interrupts */ | 1177 | /* Enable Interrupts */ |
1180 | data = 0x0c; | 1178 | data = 0x0c; |
1181 | send_mos_cmd(serial, MOS_WRITE, port_number, UART_IER, &data); | 1179 | send_mos_cmd(serial, MOS_WRITE, port_number, UART_IER, &data); |
@@ -1214,10 +1212,6 @@ static void mos7720_set_termios(struct usb_serial_port *port, | |||
1214 | 1212 | ||
1215 | tty = port->tty; | 1213 | tty = port->tty; |
1216 | 1214 | ||
1217 | if (!port->tty || !port->tty->termios) { | ||
1218 | dbg("%s - no tty or termios", __FUNCTION__); | ||
1219 | return; | ||
1220 | } | ||
1221 | 1215 | ||
1222 | if (!mos7720_port->open) { | 1216 | if (!mos7720_port->open) { |
1223 | dbg("%s - port not opened", __FUNCTION__); | 1217 | dbg("%s - port not opened", __FUNCTION__); |
@@ -1228,19 +1222,13 @@ static void mos7720_set_termios(struct usb_serial_port *port, | |||
1228 | 1222 | ||
1229 | cflag = tty->termios->c_cflag; | 1223 | cflag = tty->termios->c_cflag; |
1230 | 1224 | ||
1231 | if (!cflag) { | 1225 | dbg("%s - cflag %08x iflag %08x", __FUNCTION__, |
1232 | printk("%s %s\n",__FUNCTION__,"cflag is NULL"); | ||
1233 | return; | ||
1234 | } | ||
1235 | |||
1236 | dbg("%s - clfag %08x iflag %08x", __FUNCTION__, | ||
1237 | tty->termios->c_cflag, | 1226 | tty->termios->c_cflag, |
1238 | RELEVANT_IFLAG(tty->termios->c_iflag)); | 1227 | RELEVANT_IFLAG(tty->termios->c_iflag)); |
1239 | 1228 | ||
1240 | if (old_termios) | 1229 | dbg("%s - old cflag %08x old iflag %08x", __FUNCTION__, |
1241 | dbg("%s - old clfag %08x old iflag %08x", __FUNCTION__, | 1230 | old_termios->c_cflag, |
1242 | old_termios->c_cflag, | 1231 | RELEVANT_IFLAG(old_termios->c_iflag)); |
1243 | RELEVANT_IFLAG(old_termios->c_iflag)); | ||
1244 | 1232 | ||
1245 | dbg("%s - port %d", __FUNCTION__, port->number); | 1233 | dbg("%s - port %d", __FUNCTION__, port->number); |
1246 | 1234 | ||