struct libusb_device *dev, GSList **devices)
{
struct libusb_device_descriptor usb_desc;
struct libusb_device *dev, GSList **devices)
{
struct libusb_device_descriptor usb_desc;
struct dev_context *devc;
char *vendor, *model, *serial_num;
struct sr_dev_inst *sdi;
struct dev_context *devc;
char *vendor, *model, *serial_num;
struct sr_dev_inst *sdi;
devc->desc = desc;
vendor = g_malloc(32);
model = g_malloc(32);
serial_num = g_malloc(32);
rv = ftdi_usb_get_strings(ftdic, dev, vendor, 32,
devc->desc = desc;
vendor = g_malloc(32);
model = g_malloc(32);
serial_num = g_malloc(32);
rv = ftdi_usb_get_strings(ftdic, dev, vendor, 32,
- model, 32, serial_num, 32);
+ model, 32, serial_num, 32);
for (char *const *chan = &(desc->channel_names[0]); *chan; chan++)
sr_channel_new(sdi, chan - &(desc->channel_names[0]),
SR_CHANNEL_LOGIC, TRUE, *chan);
*devices = g_slist_append(*devices, sdi);
for (char *const *chan = &(desc->channel_names[0]); *chan; chan++)
sr_channel_new(sdi, chan - &(desc->channel_names[0]),
SR_CHANNEL_LOGIC, TRUE, *chan);
*devices = g_slist_append(*devices, sdi);
usb = l->data;
if (usb->bus == libusb_get_bus_number(devlist[i])
&& usb->address == libusb_get_device_address(devlist[i])) {
usb = l->data;
if (usb->bus == libusb_get_bus_number(devlist[i])
&& usb->address == libusb_get_device_address(devlist[i])) {
/* Hook up a dummy handler to receive data from the device. */
sr_session_source_add(sdi->session, -1, G_IO_IN, 0,
/* Hook up a dummy handler to receive data from the device. */
sr_session_source_add(sdi->session, -1, G_IO_IN, 0,
sr_dbg("Stopping acquisition.");
sr_session_source_remove(sdi->session, -1);
sr_dbg("Stopping acquisition.");
sr_session_source_remove(sdi->session, -1);