X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fbaylibre-acme%2Fprotocol.c;h=8d23b9e2f9875d36093115c52b1911c3e1ac1e2a;hb=dca972f8ba1eca12fd462bd97788b18c8953ce64;hp=89391d5482286e541873910e457be935b6e7818b;hpb=4c5f70063ad6ae311809ee7818ddc9070fbe05cf;p=libsigrok.git diff --git a/src/hardware/baylibre-acme/protocol.c b/src/hardware/baylibre-acme/protocol.c index 89391d54..8d23b9e2 100644 --- a/src/hardware/baylibre-acme/protocol.c +++ b/src/hardware/baylibre-acme/protocol.c @@ -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; }