FC1 USB serial visors (107929)

Pete Zaitcev zaitcev at redhat.com
Tue Dec 16 21:53:29 UTC 2003


This is a straightforward backport from 2.4.23. Seems like something
we better have.

-- Pete

diff -ur -X dontdiff linux-2.4.22-1.2130.nptl/drivers/usb/serial/usbserial.c linux-2.4.23/drivers/usb/serial/usbserial.c
--- linux-2.4.22-1.2130.nptl/drivers/usb/serial/usbserial.c	2003-08-25 04:44:42.000000000 -0700
+++ linux-2.4.23/drivers/usb/serial/usbserial.c	2003-11-29 18:53:05.000000000 -0800
@@ -2,8 +2,8 @@
  * USB Serial Converter driver
  *
  * Copyright (C) 1999 - 2002 Greg Kroah-Hartman (greg at kroah.com)
- * Copyright (c) 2000 Peter Berger (pberger at brimson.com)
- * Copyright (c) 2000 Al Borchers (borchers at steinerpoint.com)
+ * Copyright (C) 2000 Peter Berger (pberger at brimson.com)
+ * Copyright (C) 2000 Al Borchers (borchers at steinerpoint.com)
  *
  *	This program is free software; you can redistribute it and/or
  *	modify it under the terms of the GNU General Public License version
@@ -556,7 +556,10 @@
 		else
 			generic_close(port, filp);
 		port->open_count = 0;
-		port->tty = NULL;
+		if (port->tty) {
+			port->tty->driver_data = NULL;
+			port->tty = NULL;
+		}
 	}
 
 	if (port->serial->type->owner)
@@ -1401,12 +1404,9 @@
 		for (i = 0; i < serial->num_ports; ++i) {
 			port = &serial->port[i];
 			down (&port->sem);
-			if (port->tty != NULL) {
-				while (port->open_count > 0) {
+			if (port->tty != NULL)
+				while (port->open_count > 0)
 					__serial_close(port, NULL);
-				}
-				port->tty->driver_data = NULL;
-			}
 			up (&port->sem);
 		}
 





More information about the fedora-devel-list mailing list