]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/scpi-pps/api.c
Simplify channel creation.
[libsigrok.git] / src / hardware / scpi-pps / api.c
index c8070a063335538109aaa278ae96f4a112e9e7ae..4647031c289df9d7a30926e49c91ed9fdbb42915 100644 (file)
@@ -133,13 +133,13 @@ static struct sr_dev_inst *probe_device(struct sr_scpi_dev_inst *scpi)
                                continue;
                        g_snprintf(ch_name, 16, "%s%s", pci[i].prefix,
                                        channels[ch_num].name);
-                       ch = sr_channel_new(ch_idx++, SR_CHANNEL_ANALOG, TRUE, ch_name);
+                       ch = sr_channel_new(sdi, ch_idx++, SR_CHANNEL_ANALOG, TRUE,
+                                       ch_name);
                        pch = g_malloc0(sizeof(struct pps_channel));
                        pch->hw_output_idx = ch_num;
                        pch->hwname = channels[ch_num].name;
                        pch->mq = pci[i].mq;
                        ch->priv = pch;
-                       sdi->channels = g_slist_append(sdi->channels, ch);
                }
        }