Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
usb: Attempt detaching kernel driver
In the event that the kernel have some other driver attached to the device the attempt claim of the interface will fail. Lost in the libusb conversion was a call to USBDEVFS_DISCONNECT to first detach any such drivers. Reintroduce this by invoking libusb_detach_kernel_driver(). As with some other libusb functions there are multiple return values denoting "success", so rely on libusb_claim_interface() to catch the actual errors. Reported-by: Maxim Akristiniy Suggested-by: Maxim Akristiniy Signed-off-by: Bjorn Andersson <[email protected]>
- Loading branch information