X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Ffx2lafw%2Fapi.c;h=8e9b5be4a6688651b28096461b931ceb3b9e9efe;hb=5e23fcab889c6;hp=46520eb44b1b01fc36eeafed2addd59f672b019b;hpb=bc497772512c2fd37516964ade58b69448aae37c;p=libsigrok.git diff --git a/src/hardware/fx2lafw/api.c b/src/hardware/fx2lafw/api.c index 46520eb4..8e9b5be4 100644 --- a/src/hardware/fx2lafw/api.c +++ b/src/hardware/fx2lafw/api.c @@ -171,7 +171,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; const struct fx2lafw_profile *prof; GSList *l, *devices, *conn_devices; @@ -288,11 +287,9 @@ static GSList *scan(GSList *options) /* Fill in channellist according to this device's profile. */ num_logic_channels = prof->dev_caps & DEV_CAPS_16BIT ? 16 : 8; - for (j = 0; j < num_logic_channels; j++) { - ch = sr_channel_new(j, SR_CHANNEL_LOGIC, TRUE, + for (j = 0; j < num_logic_channels; j++) + sr_channel_new(sdi, j, SR_CHANNEL_LOGIC, TRUE, channel_names[j]); - sdi->channels = g_slist_append(sdi->channels, ch); - } devc = fx2lafw_dev_new(); devc->profile = prof;