From a1cd7e99b343543af2be4c8c5755e26f6bfd725a Mon Sep 17 00:00:00 2001 From: Oliver Neukum Date: Wed, 16 Jan 2008 17:18:52 +0100 Subject: USB: stop io performed by mos7720 upon close() This fixes a problem where the mos7720 driver will make io to a device from which it has been logically disconnected. It does so by introducing a flag by which the generic usb serial code can signal the subdrivers their disconnection and appropriate locking. Signed-off-by: Oliver Neukum Signed-off-by: Greg Kroah-Hartman --- include/linux/usb/serial.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h index ef1e430f7bfa..63b29b5332e6 100644 --- a/include/linux/usb/serial.h +++ b/include/linux/usb/serial.h @@ -129,6 +129,7 @@ struct usb_serial { struct usb_device * dev; struct usb_serial_driver * type; struct usb_interface * interface; + unsigned char disconnected; unsigned char minor; unsigned char num_ports; unsigned char num_port_pointers; @@ -138,6 +139,7 @@ struct usb_serial { char num_bulk_out; struct usb_serial_port * port[MAX_NUM_PORTS]; struct kref kref; + struct mutex disc_mutex; void * private; }; #define to_usb_serial(d) container_of(d, struct usb_serial, kref) -- cgit v1.2.2