{
#ifdef HAVE_LIBUSB_1_0
struct drv_context *drvc;
- int r, cnt, i, a, b;
+ int cnt, i, a, b;
char connection_id[64];
struct sr_usb_dev_inst *usb;
struct libusb_device **devlist;
- struct libusb_device_descriptor des;
#endif
if (!sdi)
}
for (i = 0; i < cnt; i++) {
- if ((r = libusb_get_device_descriptor(devlist[i], &des)) < 0) {
- sr_err("Failed to get device descriptor: %s.",
- libusb_error_name(r));
- continue;
- }
-
/* Find the USB device by the logical address we know. */
b = libusb_get_bus_number(devlist[i]);
a = libusb_get_device_address(devlist[i]);
struct drv_context *drvc;
struct sr_dev_inst *sdi;
struct libusb_device **devlist;
- struct libusb_device_descriptor des;
libusb_device_handle *dev_hdl;
- int dummy, ret, i;
+ int dummy, i;
unsigned char config[MAX_CONFIGBLOCK_SIZE];
drvc = di->context;
libusb_get_device_list(drvc->sr_ctx->libusb_ctx, &devlist);
for (i = 0; devlist[i]; i++) {
- if ((ret = libusb_get_device_descriptor(devlist[i], &des))) {
- sr_err("Failed to get device descriptor: %d.", ret);
- continue;
- }
-
if (libusb_get_bus_number(devlist[i]) != bus ||
libusb_get_device_address(devlist[i]) != address)
continue;