summaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/usb-serial.c
diff options
context:
space:
mode:
authorPeter Hurley <peter@hurleysoftware.com>2013-02-23 16:11:35 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-03-15 19:45:15 +0100
commit8a7298d361827a1f244415dde62b1b07688d6a3a (patch)
treef02b942432048e30b6d158cec3ebf70470c82ce6 /drivers/usb/serial/usb-serial.c
parentusb: host: ehci-mxc: Remove dev_info on probe (diff)
downloadlinux-8a7298d361827a1f244415dde62b1b07688d6a3a.tar.xz
linux-8a7298d361827a1f244415dde62b1b07688d6a3a.zip
usb/serial: Remove unnecessary check for console
The tty port ops shutdown() routine is not called for console ports; remove extra check. Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Acked-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/serial/usb-serial.c')
-rw-r--r--drivers/usb/serial/usb-serial.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
index a19ed74d770d..8424478e0b76 100644
--- a/drivers/usb/serial/usb-serial.c
+++ b/drivers/usb/serial/usb-serial.c
@@ -256,22 +256,18 @@ static int serial_open(struct tty_struct *tty, struct file *filp)
* serial_down - shut down hardware
* @tport: tty port to shut down
*
- * Shut down a USB serial port unless it is the console. We never
- * shut down the console hardware as it will always be in use. Serialized
- * against activate by the tport mutex and kept to matching open/close pairs
+ * Shut down a USB serial port. Serialized against activate by the
+ * tport mutex and kept to matching open/close pairs
* of calls by the ASYNCB_INITIALIZED flag.
+ *
+ * Not called if tty is console.
*/
static void serial_down(struct tty_port *tport)
{
struct usb_serial_port *port =
container_of(tport, struct usb_serial_port, port);
struct usb_serial_driver *drv = port->serial->type;
- /*
- * The console is magical. Do not hang up the console hardware
- * or there will be tears.
- */
- if (port->port.console)
- return;
+
if (drv->close)
drv->close(port);
}