From: Xiaofan C. <xia...@gm...> - 2012-07-28 10:39:50
|
On Sat, Jul 28, 2012 at 5:54 PM, Hans de Goede <hde...@re...> wrote: > Currently applications for devices which only are accessed from > userspace can use claim / release interface to make sure they > don't get in each others way. The same however does not work > for applications which first need to detach > a "native" / in kernel driver, as this detach will not only detach native > drivers but also the usbfs driver, thus stealing the device from another > userspace / libusb app. > > This patch fixes libusb_detach_kernel_driver to only detach "real" kernel > drivers and not the special usbfs driver used for userspace access to > USB devices. If the usbfs driver is found LIBUSB_ERROR_BUSY will be > returned. Hmm, what if no other applications are using the device and usbfs is attached to the device? In that case, there should be no error. Related ticket: https://github.com/libusbx/libusbx/issues/20 https://github.com/libusbx/libusbx/issues/17 -- Xiaofan |