public inbox for linux-serial@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] usb/serial: Remove unnecessary check for console
@ 2013-02-23 15:11 Peter Hurley
  2013-02-23 15:57 ` Johan Hovold
  0 siblings, 1 reply; 2+ messages in thread
From: Peter Hurley @ 2013-02-23 15:11 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-serial-u79uwXL29TY76Z2rM5mHXA,
	linux-usb-u79uwXL29TY76Z2rM5mHXA, Peter Hurley

The tty port ops shutdown() routine is not called for console ports;
remove extra check.

Signed-off-by: Peter Hurley <peter-WaGBZJeGNqdsbIuE7sb01tBPR1lH4CV8@public.gmane.org>
---
 drivers/usb/serial/usb-serial.c | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
index a19ed74..8424478 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);
 }
-- 
1.8.1.2

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] usb/serial: Remove unnecessary check for console
  2013-02-23 15:11 [PATCH] usb/serial: Remove unnecessary check for console Peter Hurley
@ 2013-02-23 15:57 ` Johan Hovold
  0 siblings, 0 replies; 2+ messages in thread
From: Johan Hovold @ 2013-02-23 15:57 UTC (permalink / raw)
  To: Peter Hurley; +Cc: Greg Kroah-Hartman, linux-serial, linux-usb

On Sat, Feb 23, 2013 at 10:11:35AM -0500, Peter Hurley wrote:
> 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>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-02-23 15:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-23 15:11 [PATCH] usb/serial: Remove unnecessary check for console Peter Hurley
2013-02-23 15:57 ` Johan Hovold

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox