提交 f9cfabce 编写于 作者: D Dave Penkler 提交者: Greg Kroah-Hartman

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: eb6b92ec ("Add support for receiving USBTMC USB488 SRQ notifications via poll/select")
Reported-by: NOliver Neukum <oneukum@suse.com>
Signed-off-by: NDave Penkler <dpenkler@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 6edd87f5
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册