]> sigrok.org Git - libsigrok.git/commitdiff
hantek-dso: instance list fix
authorBert Vermeulen <redacted>
Fri, 13 Jul 2012 20:18:01 +0000 (22:18 +0200)
committerBert Vermeulen <redacted>
Fri, 3 Aug 2012 08:27:38 +0000 (10:27 +0200)
hardware/hantek-dso/dso.c

index 77cad923e1554ce514423d2eabfe2641ac556544..4eedf7987b905b70f61e1420c8914e3cb4acd5c1 100644 (file)
@@ -28,7 +28,8 @@
 #include <libusb.h>
 
 extern libusb_context *usb_context;
-extern GSList *dev_insts;
+extern struct sr_dev_driver hantek_dso_driver_info;
+static struct sr_dev_driver *hdi = &hantek_dso_driver_info;
 
 
 static int send_begin(struct context *ctx)
@@ -112,7 +113,7 @@ SR_PRIV int dso_open(int dev_index)
        struct context *ctx;
        int err, skip, i;
 
-       if (!(sdi = sr_dev_inst_get(dev_insts, dev_index)))
+       if (!(sdi = sr_dev_inst_get(hdi->instances, dev_index)))
                return SR_ERR_ARG;
        ctx = sdi->priv;