X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Ffx2lafw%2Fapi.c;h=8e9b5be4a6688651b28096461b931ceb3b9e9efe;hb=16aca7661b7ab34a399c323bb9214721e2b1be0c;hp=46520eb44b1b01fc36eeafed2addd59f672b019b;hpb=6fcf3f0a22e3dd2467fd09b0cad92b36e0409fc4;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;