diff options
author | Chris Dickens <christopher.a.dickens@gmail.com> | 2014-08-25 23:26:52 -0700 |
---|---|---|
committer | Chris Dickens <christopher.a.dickens@gmail.com> | 2014-08-27 01:50:09 -0700 |
commit | 9a9ef3ec2b9c691609ec9f8b82ac4436a662df18 (patch) | |
tree | 901f35fd2fbba3acc711229544d613ff4a48db1b /libusb/os/linux_usbfs.c | |
parent | a3a4806d494b8ff3dd213d5eb408b657bcdd47f0 (diff) | |
download | libusb-9a9ef3ec2b9c691609ec9f8b82ac4436a662df18.tar.gz |
core: Only interrupt event handlers as necessary during libusb_open()
The current behavior of libusb_open() unconditionally interrupts
any event handlers via usbi_fd_notification(). However, not all
backends, namely Win/WinCE, make changes to the pollfd list during
a device open.
This change adds a new CAP for backends (HAS_POLLABLE_DEVICE_FD),
and libusb_open() will only call usbi_fd_notification() if the
backend declares this capability.
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
Diffstat (limited to 'libusb/os/linux_usbfs.c')
-rw-r--r-- | libusb/os/linux_usbfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libusb/os/linux_usbfs.c b/libusb/os/linux_usbfs.c index db21710..77df258 100644 --- a/libusb/os/linux_usbfs.c +++ b/libusb/os/linux_usbfs.c @@ -2646,7 +2646,7 @@ static clockid_t op_get_timerfd_clockid(void) const struct usbi_os_backend linux_usbfs_backend = { .name = "Linux usbfs", - .caps = USBI_CAP_HAS_HID_ACCESS|USBI_CAP_SUPPORTS_DETACH_KERNEL_DRIVER, + .caps = USBI_CAP_HAS_HID_ACCESS|USBI_CAP_SUPPORTS_DETACH_KERNEL_DRIVER|USBI_CAP_HAS_POLLABLE_DEVICE_FD, .init = op_init, .exit = op_exit, .get_device_list = NULL, |