From: Uwe Hermann Date: Thu, 9 Jul 2015 23:03:16 +0000 (+0200) Subject: fx2lafw: Use the USB_INTERFACE #define. X-Git-Tag: libsigrok-0.4.0~463 X-Git-Url: http://sigrok.org/gitweb/?a=commitdiff_plain;h=c11a1e6122998b247df66c59d2076eb814818497;p=libsigrok.git fx2lafw: Use the USB_INTERFACE #define. --- diff --git a/src/hardware/fx2lafw/protocol.c b/src/hardware/fx2lafw/protocol.c index b1c20a71..6098f24e 100644 --- a/src/hardware/fx2lafw/protocol.c +++ b/src/hardware/fx2lafw/protocol.c @@ -245,8 +245,8 @@ SR_PRIV int fx2lafw_dev_open(struct sr_dev_inst *sdi, struct sr_dev_driver *di) } if (libusb_has_capability(LIBUSB_CAP_SUPPORTS_DETACH_KERNEL_DRIVER)) { - if (libusb_kernel_driver_active(usb->devhdl, 0) == 1) { - if ((ret = libusb_detach_kernel_driver(usb->devhdl, 0)) < 0) { + if (libusb_kernel_driver_active(usb->devhdl, USB_INTERFACE) == 1) { + if ((ret = libusb_detach_kernel_driver(usb->devhdl, USB_INTERFACE)) < 0) { sr_err("Failed to detach kernel driver: %s.", libusb_error_name(ret)); return SR_ERR;