X-Git-Url: https://sigrok.org/gitweb/?p=libsigrok.git;a=blobdiff_plain;f=src%2Fhardware%2Fatten-pps3xxx%2Fapi.c;h=1eafaaff8d42fbc291396e3d2f98f0131f782984;hp=b72eeb4a59107aff7b415438e23efeb0c904dd71;hb=5e23fcab889c62864b92aa3ad6902ce3e9f5be49;hpb=bc497772512c2fd37516964ade58b69448aae37c diff --git a/src/hardware/atten-pps3xxx/api.c b/src/hardware/atten-pps3xxx/api.c index b72eeb4a..1eafaaff 100644 --- a/src/hardware/atten-pps3xxx/api.c +++ b/src/hardware/atten-pps3xxx/api.c @@ -173,8 +173,7 @@ static GSList *scan(GSList *options, int modelid) sdi->conn = serial; for (i = 0; i < MAX_CHANNELS; i++) { snprintf(channel, 10, "CH%d", i + 1); - ch = sr_channel_new(i, SR_CHANNEL_ANALOG, TRUE, channel); - sdi->channels = g_slist_append(sdi->channels, ch); + ch = sr_channel_new(sdi, i, SR_CHANNEL_ANALOG, TRUE, channel); cg = g_malloc(sizeof(struct sr_channel_group)); cg->name = g_strdup(channel); cg->channels = g_slist_append(NULL, ch);