]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/victor-dmm/api.c
Simplify channel creation.
[libsigrok.git] / src / hardware / victor-dmm / api.c
index f2e3d783bb4e816c81667e2434a197dccbe1a840..2552027cec4284f6c2bb382d7257b44997575495 100644 (file)
@@ -59,7 +59,6 @@ static GSList *scan(GSList *options)
        struct drv_context *drvc;
        struct dev_context *devc;
        struct sr_dev_inst *sdi;
-       struct sr_channel *ch;
        struct libusb_device_descriptor des;
        libusb_device **devlist;
        GSList *devices;
@@ -92,8 +91,7 @@ static GSList *scan(GSList *options)
                devc = g_malloc0(sizeof(struct dev_context));
                sdi->priv = devc;
 
-               ch = sr_channel_new(0, SR_CHANNEL_ANALOG, TRUE, "P1");
-               sdi->channels = g_slist_append(NULL, ch);
+               sr_channel_new(sdi, 0, SR_CHANNEL_ANALOG, TRUE, "P1");
 
                sdi->conn = sr_usb_dev_inst_new(libusb_get_bus_number(devlist[i]),
                                libusb_get_device_address(devlist[i]), NULL);