From c11a1e6122998b247df66c59d2076eb814818497 Mon Sep 17 00:00:00 2001 From: Uwe Hermann Date: Fri, 10 Jul 2015 01:03:16 +0200 Subject: [PATCH] fx2lafw: Use the USB_INTERFACE #define. --- src/hardware/fx2lafw/protocol.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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;