X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fdreamsourcelab-dslogic%2Fapi.c;h=6d5b7fc7d6cd009d5bf90c8f043fa0cc28162993;hb=aec7d8551d588f9b1af33733a0d642d2eb0e3199;hp=98f4acdb159269efed773f517a18d96f9e119503;hpb=1372bdcdb56704c5aed01603c14b7b051af5f65e;p=libsigrok.git diff --git a/src/hardware/dreamsourcelab-dslogic/api.c b/src/hardware/dreamsourcelab-dslogic/api.c index 98f4acdb..6d5b7fc7 100644 --- a/src/hardware/dreamsourcelab-dslogic/api.c +++ b/src/hardware/dreamsourcelab-dslogic/api.c @@ -240,15 +240,13 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options) sdi->connection_id = g_strdup(connection_id); /* Logic channels, all in one channel group. */ - cg = g_malloc0(sizeof(struct sr_channel_group)); - cg->name = g_strdup("Logic"); + cg = sr_channel_group_new(sdi, "Logic", NULL); for (j = 0; j < NUM_CHANNELS; j++) { sprintf(channel_name, "%d", j); ch = sr_channel_new(sdi, j, SR_CHANNEL_LOGIC, TRUE, channel_name); cg->channels = g_slist_append(cg->channels, ch); } - sdi->channel_groups = g_slist_append(NULL, cg); devc = dslogic_dev_new(); devc->profile = prof;