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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
828d55c58c
commit
a1cd7e99b3
@@ -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)
|
||||
|
Reference in New Issue
Block a user