- if (des.idVendor == USB_VENDOR && des.idProduct == USB_PRODUCT) {
- /* Definitely a Saleae Logic... */
-
- sdi = sigrok_device_instance_new(devcnt,
- ST_INITIALIZING, USB_VENDOR_NAME,
- USB_MODEL_NAME, USB_MODEL_VERSION);
- if (!sdi)
- return 0;
- device_instances =
- g_slist_append(device_instances, sdi);
-
- if (check_conf_profile(devlist[i]) == 0) {
- if (upload_firmware(devlist[i]) > 0)
- /*
- * Continue on the off chance that the
- * device is in a working state.
- * TODO: Could maybe try a USB reset,
- * or uploading the firmware again.
- */
- g_warning("firmware upload failed for device %d", devcnt);
-
- sdi->usb = usb_device_instance_new
- (libusb_get_bus_number(devlist[i]), 0, NULL);
- } else {
- /*
- * Already has the firmware on it, so fix the
- * new address.
- */
- sdi->usb = usb_device_instance_new
- (libusb_get_bus_number(devlist[i]),
- libusb_get_device_address(devlist[i]),
- NULL);
+ for (j = 0; supported_fx2[j].orig_vid; j++) {
+ if (des.idVendor == supported_fx2[j].orig_vid
+ && des.idProduct == supported_fx2[j].orig_pid) {
+ fx2_prof = &supported_fx2[j];
+ break;