diff options
author | Oliver Neukum <oliver@neukum.org> | 2008-01-16 11:18:52 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-02-01 17:35:03 -0500 |
commit | a1cd7e99b343543af2be4c8c5755e26f6bfd725a (patch) | |
tree | 41f8de097dd0889a9c6d02fa0a22b16d5146de46 /include | |
parent | 828d55c58cba6b652fd30e00c3d940cb7c523e3c (diff) |
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 <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/usb/serial.h | 2 |
1 files changed, 2 insertions, 0 deletions
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 { | |||
129 | struct usb_device * dev; | 129 | struct usb_device * dev; |
130 | struct usb_serial_driver * type; | 130 | struct usb_serial_driver * type; |
131 | struct usb_interface * interface; | 131 | struct usb_interface * interface; |
132 | unsigned char disconnected; | ||
132 | unsigned char minor; | 133 | unsigned char minor; |
133 | unsigned char num_ports; | 134 | unsigned char num_ports; |
134 | unsigned char num_port_pointers; | 135 | unsigned char num_port_pointers; |
@@ -138,6 +139,7 @@ struct usb_serial { | |||
138 | char num_bulk_out; | 139 | char num_bulk_out; |
139 | struct usb_serial_port * port[MAX_NUM_PORTS]; | 140 | struct usb_serial_port * port[MAX_NUM_PORTS]; |
140 | struct kref kref; | 141 | struct kref kref; |
142 | struct mutex disc_mutex; | ||
141 | void * private; | 143 | void * private; |
142 | }; | 144 | }; |
143 | #define to_usb_serial(d) container_of(d, struct usb_serial, kref) | 145 | #define to_usb_serial(d) container_of(d, struct usb_serial, kref) |