patch-2.4.23 linux-2.4.23/drivers/usb/serial/usbserial.c
Next file: linux-2.4.23/drivers/usb/serial/visor.c
Previous file: linux-2.4.23/drivers/usb/serial/usb-serial.h
Back to the patch index
Back to the overall index
- Lines: 38
- Date:
2003-11-28 10:26:20.000000000 -0800
- Orig file:
linux-2.4.22/drivers/usb/serial/usbserial.c
- Orig date:
2003-08-25 04:44:42.000000000 -0700
diff -urN linux-2.4.22/drivers/usb/serial/usbserial.c linux-2.4.23/drivers/usb/serial/usbserial.c
@@ -2,8 +2,8 @@
* USB Serial Converter driver
*
* Copyright (C) 1999 - 2002 Greg Kroah-Hartman (greg@kroah.com)
- * Copyright (c) 2000 Peter Berger (pberger@brimson.com)
- * Copyright (c) 2000 Al Borchers (borchers@steinerpoint.com)
+ * Copyright (C) 2000 Peter Berger (pberger@brimson.com)
+ * Copyright (C) 2000 Al Borchers (borchers@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);
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)