diff options
author | Dave Penkler <dpenkler@gmail.com> | 2016-02-18 10:03:00 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-02-20 20:21:53 -0800 |
commit | f9cfabcecd0c46617d0f56388cb2f4bd90f4d5ca (patch) | |
tree | b389f90f333db1d708abc55c11970adf11077f08 /drivers/usb/class/usbtmc.c | |
parent | 6edd87f589cf1cd4c93ee07b8f8c72a5af427b10 (diff) | |
download | linux-f9cfabcecd0c46617d0f56388cb2f4bd90f4d5ca.tar.bz2 |
usb: usbtmc: Fix disconnect/poll interaction
When the device is disconnected poll waiters were not being woken.
Changes for v2:
- add commit summary
- add Fixes and Reported-by tags
Fixes: eb6b92ecc0f9 ("Add support for receiving USBTMC USB488 SRQ notifications via poll/select")
Reported-by: Oliver Neukum <oneukum@suse.com>
Signed-off-by: Dave Penkler <dpenkler@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/class/usbtmc.c')
-rw-r--r-- | drivers/usb/class/usbtmc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/class/usbtmc.c b/drivers/usb/class/usbtmc.c index 419c72e10464..917a55c4480d 100644 --- a/drivers/usb/class/usbtmc.c +++ b/drivers/usb/class/usbtmc.c @@ -1525,13 +1525,14 @@ static void usbtmc_disconnect(struct usb_interface *intf) dev_dbg(&intf->dev, "usbtmc_disconnect called\n"); data = usb_get_intfdata(intf); - usbtmc_free_int(data); usb_deregister_dev(intf, &usbtmc_class); sysfs_remove_group(&intf->dev.kobj, &capability_attr_grp); sysfs_remove_group(&intf->dev.kobj, &data_attr_grp); mutex_lock(&data->io_mutex); data->zombie = 1; + wake_up_all(&data->waitq); mutex_unlock(&data->io_mutex); + usbtmc_free_int(data); kref_put(&data->kref, usbtmc_delete); } |