usb/serial: Remove unnecessary check for console
Subsystems (3)
PATCH 1/1 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 <[email protected]>
--- drivers/usb/serial/usb-serial.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-)
drivers/usb/serial/usb-serial.c +5 -9
@@ -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); }
Signature · 6 lines
1.8.1.2 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 4 lines · Peter Hurley
The tty port ops
shutdown()routine is not called for console ports; remove extra check.Signed-off-by Peter Hurley <[email protected]>
Acked-by Johan Hovold <[email protected]>