X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fmotech-lps-30x%2Fapi.c;fp=src%2Fhardware%2Fmotech-lps-30x%2Fapi.c;h=b29346ca1cbcab166b6e37d6210ed08b11bec310;hb=d810901a45e01b8e79f6b269dbb931b538071953;hp=31bbfa43827f6c75fecb628bb461f093592fd51e;hpb=7047acc8e85b38713450e800037dbcddb1fa98ac;p=libsigrok.git diff --git a/src/hardware/motech-lps-30x/api.c b/src/hardware/motech-lps-30x/api.c index 31bbfa43..b29346ca 100644 --- a/src/hardware/motech-lps-30x/api.c +++ b/src/hardware/motech-lps-30x/api.c @@ -438,13 +438,9 @@ static GSList *do_scan(lps_modelid modelid, struct sr_dev_driver *drv, GSList *o devc->channel_status[cnt].info = g_slist_append(NULL, ch); - cg = g_malloc(sizeof(struct sr_channel_group)); snprintf(channel, sizeof(channel), "CG%d", cnt + 1); - cg->name = g_strdup(channel); - cg->priv = NULL; + cg = sr_channel_group_new(sdi, channel, NULL); cg->channels = g_slist_append(NULL, ch); - - sdi->channel_groups = g_slist_append(sdi->channel_groups, cg); } /* Query status */