]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - drivers/usb/serial/quatech2.c
Merge tag 'tty-3.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
[mirror_ubuntu-artful-kernel.git] / drivers / usb / serial / quatech2.c
index 6850745808c3932e3167f2d85c76636465eecec4..00e6c9bac8a309b0df675903654ce0521f991cad 100644 (file)
@@ -928,19 +928,17 @@ static void qt2_dtr_rts(struct usb_serial_port *port, int on)
        struct usb_device *dev = port->serial->dev;
        struct qt2_port_private *port_priv = usb_get_serial_port_data(port);
 
-       mutex_lock(&port->serial->disc_mutex);
-       if (!port->serial->disconnected) {
-               /* Disable flow control */
-               if (!on && qt2_setregister(dev, port_priv->device_port,
+       /* Disable flow control */
+       if (!on) {
+               if (qt2_setregister(dev, port_priv->device_port,
                                           UART_MCR, 0) < 0)
                        dev_warn(&port->dev, "error from flowcontrol urb\n");
-               /* drop RTS and DTR */
-               if (on)
-                       update_mctrl(port_priv, TIOCM_DTR | TIOCM_RTS, 0);
-               else
-                       update_mctrl(port_priv, 0, TIOCM_DTR | TIOCM_RTS);
        }
-       mutex_unlock(&port->serial->disc_mutex);
+       /* drop RTS and DTR */
+       if (on)
+               update_mctrl(port_priv, TIOCM_DTR | TIOCM_RTS, 0);
+       else
+               update_mctrl(port_priv, 0, TIOCM_DTR | TIOCM_RTS);
 }
 
 static void qt2_update_msr(struct usb_serial_port *port, unsigned char *ch)