X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fsaleae-logic16%2Fapi.c;h=cf6063af4790b9e5116bdb12a5725d05fbe8efc0;hb=16aca7661b7ab34a399c323bb9214721e2b1be0c;hp=f33894ea0e0a8f294c4aa5beeaa5c8d191dba14c;hpb=5a971f66a37df7c4dbe7799b3c7fc7eb30055a61;p=libsigrok.git diff --git a/src/hardware/saleae-logic16/api.c b/src/hardware/saleae-logic16/api.c index f33894ea..cf6063af 100644 --- a/src/hardware/saleae-logic16/api.c +++ b/src/hardware/saleae-logic16/api.c @@ -145,7 +145,6 @@ static GSList *scan(GSList *options) struct dev_context *devc; struct sr_dev_inst *sdi; struct sr_usb_dev_inst *usb; - struct sr_channel *ch; struct sr_config *src; GSList *l, *devices, *conn_devices; struct libusb_device_descriptor des; @@ -206,11 +205,9 @@ static GSList *scan(GSList *options) sdi->driver = di; sdi->connection_id = g_strdup(connection_id); - for (j = 0; channel_names[j]; j++) { - ch = sr_channel_new(j, SR_CHANNEL_LOGIC, TRUE, + for (j = 0; channel_names[j]; j++) + sr_channel_new(sdi, j, SR_CHANNEL_LOGIC, TRUE, channel_names[j]); - sdi->channels = g_slist_append(sdi->channels, ch); - } devc = g_malloc0(sizeof(struct dev_context)); devc->selected_voltage_range = VOLTAGE_RANGE_18_33_V;