+/**
+ * Find USB devices according to a connection string.
+ *
+ * @param usb_ctx libusb context to use while scanning.
+ * @param conn Connection string specifying the device(s) to match. This
+ * can be of the form "<bus>.<address>", or "<vendorid>.<productid>".
+ *
+ * @return A GSList of struct sr_usb_dev_inst, with bus and address fields
+ * matching the device that matched the connection string. The GSList and
+ * its contents must be freed by the caller.
+ */
+SR_PRIV GSList *sr_usb_find(libusb_context *usb_ctx, const char *conn)
+{
+ struct sr_usb_dev_inst *usb;
+ struct libusb_device **devlist;
+ struct libusb_device_descriptor des;
+ GSList *devices;
+ uint16_t vid, pid;
+ uint8_t bus, addr;
+ int b, a, ret, i;
+
+ ret = sr_usb_split_conn(conn, &vid, &pid, &bus, &addr);
+ if (ret != SR_OK) {
+ sr_err("Invalid input, or neither VID:PID nor bus.address specified.");