]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/agilent-dmm/api.c
Simplify channel creation.
[libsigrok.git] / src / hardware / agilent-dmm / api.c
index 374c206a8a6de90eef5f0099ce9e6424b8c5e929..7cfb69d81280f06f5f56ad10fd8df7a85d197863 100644 (file)
@@ -84,7 +84,6 @@ static GSList *scan(GSList *options)
        struct drv_context *drvc;
        struct dev_context *devc;
        struct sr_config *src;
-       struct sr_channel *ch;
        struct sr_serial_dev_inst *serial;
        GSList *l, *devices;
        int len, i;
@@ -150,8 +149,7 @@ static GSList *scan(GSList *options)
                        sdi->conn = serial;
                        sdi->priv = devc;
                        sdi->driver = di;
-                       ch = sr_channel_new(0, SR_CHANNEL_ANALOG, TRUE, "P1");
-                       sdi->channels = g_slist_append(sdi->channels, ch);
+                       sr_channel_new(sdi, 0, SR_CHANNEL_ANALOG, TRUE, "P1");
                        drvc->instances = g_slist_append(drvc->instances, sdi);
                        devices = g_slist_append(devices, sdi);
                        break;