summaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial
diff options
context:
space:
mode:
authorJohan Hovold <jhovold@gmail.com>2013-03-21 12:37:37 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-03-25 21:54:30 +0100
commit87ddf4dc16d93db92431d57c4b2fcd640f428228 (patch)
tree8f94e1602061050ddd58b4455c86309f6b148ad6 /drivers/usb/serial
parentUSB: cp210x: always disable uart on close (diff)
downloadlinux-87ddf4dc16d93db92431d57c4b2fcd640f428228.tar.xz
linux-87ddf4dc16d93db92431d57c4b2fcd640f428228.zip
USB: cypress_m8: remove bogus disconnect test from close
Remove disconnected test from close which did not protect any device IO at all. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/serial')
-rw-r--r--drivers/usb/serial/cypress_m8.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/drivers/usb/serial/cypress_m8.c b/drivers/usb/serial/cypress_m8.c
index e4a62cfc4081..d341555d37d8 100644
--- a/drivers/usb/serial/cypress_m8.c
+++ b/drivers/usb/serial/cypress_m8.c
@@ -632,12 +632,6 @@ static void cypress_close(struct usb_serial_port *port)
struct cypress_private *priv = usb_get_serial_port_data(port);
unsigned long flags;
- /* writing is potentially harmful, lock must be taken */
- mutex_lock(&port->serial->disc_mutex);
- if (port->serial->disconnected) {
- mutex_unlock(&port->serial->disc_mutex);
- return;
- }
spin_lock_irqsave(&priv->lock, flags);
kfifo_reset_out(&priv->write_fifo);
spin_unlock_irqrestore(&priv->lock, flags);
@@ -649,7 +643,6 @@ static void cypress_close(struct usb_serial_port *port)
if (stats)
dev_info(&port->dev, "Statistics: %d Bytes In | %d Bytes Out | %d Commands Issued\n",
priv->bytes_in, priv->bytes_out, priv->cmd_count);
- mutex_unlock(&port->serial->disc_mutex);
} /* cypress_close */