Permalink
Browse files

[bugfix] Detach kernel driver before claiming interface

Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
  • Loading branch information...
1 parent e184ae9 commit 0d025060b3876a68269ac7b16cba6afc495b923f @ezrec committed Sep 10, 2010
Showing with 2 additions and 8 deletions.
  1. +2 −8 src/ip-usbph.c
View
@@ -89,20 +89,14 @@ struct ip_usbph *ip_usbph_acquire(int index)
if (err < 0)
continue;
- err = libusb_claim_interface(usb, 3);
- if (err < 0) {
- libusb_close(usb);
- continue;
- }
-
err = libusb_detach_kernel_driver(usb, 3);
if (err < 0 && errno != ENODATA) {
libusb_close(usb);
continue;
}
- err = libusb_clear_halt(usb, 3);
- if (err < 0 && errno != ENOENT) {
+ err = libusb_claim_interface(usb, 3);
+ if (err < 0) {
libusb_close(usb);
continue;
}

0 comments on commit 0d02506

Please sign in to comment.