]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/baylibre-acme/protocol.c
output/csv: use intermediate time_t var, silence compiler warning
[libsigrok.git] / src / hardware / baylibre-acme / protocol.c
index 89391d5482286e541873910e457be935b6e7818b..8d23b9e2f9875d36093115c52b1911c3e1ac1e2a 100644 (file)
@@ -332,9 +332,8 @@ SR_PRIV gboolean bl_acme_register_probe(struct sr_dev_inst *sdi, int type,
        if (hwmon < 0)
                return FALSE;
 
-       cg = g_malloc0(sizeof(struct sr_channel_group));
        cgp = g_malloc0(sizeof(struct channel_group_priv));
-       cg->priv = cgp;
+       cg = sr_channel_group_new(sdi, NULL, cgp);
 
        /*
         * See if we can read the EEPROM contents. If not, assume it's
@@ -380,8 +379,6 @@ SR_PRIV gboolean bl_acme_register_probe(struct sr_dev_inst *sdi, int type,
                sr_err("Invalid probe type: %d.", type);
        }
 
-       sdi->channel_groups = g_slist_append(sdi->channel_groups, cg);
-
        return TRUE;
 }