aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/usb/serial/mos7840.c28
1 files changed, 6 insertions, 22 deletions
diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c
index 316ad5f0d1a2..979ef1999581 100644
--- a/drivers/usb/serial/mos7840.c
+++ b/drivers/usb/serial/mos7840.c
@@ -1223,25 +1223,10 @@ static void mos7840_close(struct usb_serial_port *port)
1223 } 1223 }
1224 } 1224 }
1225 1225
1226 /* While closing port, shutdown all bulk read, write * 1226 usb_kill_urb(mos7840_port->write_urb);
1227 * and interrupt read if they exists */ 1227 usb_kill_urb(mos7840_port->read_urb);
1228 if (serial->dev) { 1228 mos7840_port->read_urb_busy = false;
1229 if (mos7840_port->write_urb) { 1229
1230 dev_dbg(&port->dev, "%s", "Shutdown bulk write\n");
1231 usb_kill_urb(mos7840_port->write_urb);
1232 }
1233 if (mos7840_port->read_urb) {
1234 dev_dbg(&port->dev, "%s", "Shutdown bulk read\n");
1235 usb_kill_urb(mos7840_port->read_urb);
1236 mos7840_port->read_urb_busy = false;
1237 }
1238 if ((&mos7840_port->control_urb)) {
1239 dev_dbg(&port->dev, "%s", "Shutdown control read\n");
1240 /*/ usb_kill_urb (mos7840_port->control_urb); */
1241 }
1242 }
1243/* if(mos7840_port->ctrl_buf != NULL) */
1244/* kfree(mos7840_port->ctrl_buf); */
1245 port0->open_ports--; 1230 port0->open_ports--;
1246 dev_dbg(&port->dev, "%s in close%d:in port%d\n", __func__, port0->open_ports, port->number); 1231 dev_dbg(&port->dev, "%s in close%d:in port%d\n", __func__, port0->open_ports, port->number);
1247 if (port0->open_ports == 0) { 1232 if (port0->open_ports == 0) {
@@ -1330,9 +1315,8 @@ static void mos7840_break(struct tty_struct *tty, int break_state)
1330 if (mos7840_port == NULL) 1315 if (mos7840_port == NULL)
1331 return; 1316 return;
1332 1317
1333 if (serial->dev) 1318 /* flush and block until tx is empty */
1334 /* flush and block until tx is empty */ 1319 mos7840_block_until_chase_response(tty, mos7840_port);
1335 mos7840_block_until_chase_response(tty, mos7840_port);
1336 1320
1337 if (break_state == -1) 1321 if (break_state == -1)
1338 data = mos7840_port->shadowLCR | LCR_SET_BREAK; 1322 data = mos7840_port->shadowLCR | LCR_SET_BREAK;