X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fzeroplus-logic-cube%2Fapi.c;h=fd3ef08bcb325578ca66bf0fa502e9f06a4d3fce;hb=16aca7661b7ab34a399c323bb9214721e2b1be0c;hp=fa6ef1dc3c76a58ea02c47fb5d3cf412dbe5d999;hpb=c368e6f3d248a73d69cd0c2c4a7c88a92def55e3;p=libsigrok.git diff --git a/src/hardware/zeroplus-logic-cube/api.c b/src/hardware/zeroplus-logic-cube/api.c index fa6ef1dc..fd3ef08b 100644 --- a/src/hardware/zeroplus-logic-cube/api.c +++ b/src/hardware/zeroplus-logic-cube/api.c @@ -164,7 +164,6 @@ static int init(struct sr_context *sr_ctx) static GSList *scan(GSList *options) { struct sr_dev_inst *sdi; - struct sr_channel *ch; struct drv_context *drvc; struct dev_context *devc; const struct zp_model *prof; @@ -247,11 +246,9 @@ static GSList *scan(GSList *options) // memset(devc->trigger_buffer, 0, NUM_TRIGGER_STAGES); /* Fill in channellist according to this device's profile. */ - for (j = 0; j < devc->num_channels; j++) { - ch = sr_channel_new(j, SR_CHANNEL_LOGIC, TRUE, + for (j = 0; j < devc->num_channels; j++) + sr_channel_new(sdi, j, SR_CHANNEL_LOGIC, TRUE, channel_names[j]); - sdi->channels = g_slist_append(sdi->channels, ch); - } devices = g_slist_append(devices, sdi); drvc->instances = g_slist_append(drvc->instances, sdi);