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,