X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fmicrochip-pickit2%2Fapi.c;h=d8a757283655496d10b9a2c2d26eed2c7c875694;hb=81ceb6a51dd666987fb5c67b83c5ba14d105b301;hp=4eb755d274d057e3eae731e378c8f815b9589e4e;hpb=fbbf21dcf5d16385ae75f786041b3c4a497662b5;p=libsigrok.git diff --git a/src/hardware/microchip-pickit2/api.c b/src/hardware/microchip-pickit2/api.c index 4eb755d2..d8a75728 100644 --- a/src/hardware/microchip-pickit2/api.c +++ b/src/hardware/microchip-pickit2/api.c @@ -159,9 +159,7 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options) sdi->connection_id = g_strdup(conn); /* Create the logic channels group. */ - cg = g_malloc0(sizeof(*cg)); - sdi->channel_groups = g_slist_append(NULL, cg); - cg->name = g_strdup("Logic"); + cg = sr_channel_group_new(sdi, "Logic", NULL); ch_count = ARRAY_SIZE(channel_names); for (ch_idx = 0; ch_idx < ch_count; ch_idx++) { ch = sr_channel_new(sdi, ch_idx, SR_CHANNEL_LOGIC,