Commit 80dfe0ce authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman

USB: keyspan: remove bogus disconnect test in close

Remove bogus (and unnecessary) test for serial->dev being NULL in close.

The device is never cleared, and close is never called after a completed
disconnect anyway.

Remove some out-commented bogus code while at it.
Signed-off-by: default avatarJohan Hovold <jhovold@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 853127fa
...@@ -1115,7 +1115,6 @@ static void keyspan_dtr_rts(struct usb_serial_port *port, int on) ...@@ -1115,7 +1115,6 @@ static void keyspan_dtr_rts(struct usb_serial_port *port, int on)
static void keyspan_close(struct usb_serial_port *port) static void keyspan_close(struct usb_serial_port *port)
{ {
int i; int i;
struct usb_serial *serial = port->serial;
struct keyspan_port_private *p_priv; struct keyspan_port_private *p_priv;
p_priv = usb_get_serial_port_data(port); p_priv = usb_get_serial_port_data(port);
...@@ -1123,28 +1122,17 @@ static void keyspan_close(struct usb_serial_port *port) ...@@ -1123,28 +1122,17 @@ static void keyspan_close(struct usb_serial_port *port)
p_priv->rts_state = 0; p_priv->rts_state = 0;
p_priv->dtr_state = 0; p_priv->dtr_state = 0;
if (serial->dev) { keyspan_send_setup(port, 2);
keyspan_send_setup(port, 2); /* pilot-xfer seems to work best with this delay */
/* pilot-xfer seems to work best with this delay */ mdelay(100);
mdelay(100);
/* keyspan_set_termios(port, NULL); */
}
/*while (p_priv->outcont_urb->status == -EINPROGRESS) {
dev_dbg(&port->dev, "%s - urb in progress\n", __func__);
}*/
p_priv->out_flip = 0; p_priv->out_flip = 0;
p_priv->in_flip = 0; p_priv->in_flip = 0;
if (serial->dev) { stop_urb(p_priv->inack_urb);
/* Stop reading/writing urbs */ for (i = 0; i < 2; i++) {
stop_urb(p_priv->inack_urb); stop_urb(p_priv->in_urbs[i]);
/* stop_urb(p_priv->outcont_urb); */ stop_urb(p_priv->out_urbs[i]);
for (i = 0; i < 2; i++) {
stop_urb(p_priv->in_urbs[i]);
stop_urb(p_priv->out_urbs[i]);
}
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment