]> sigrok.org Git - libsigrok.git/blobdiff - hardware/chronovu-la8/api.c
sr: remove obsolete SR_DI_INST
[libsigrok.git] / hardware / chronovu-la8 / api.c
index a8888604e40be1805a7282a47ec17fd851cd95de..f9320a00705e9a5177ed1ad571335f58329c9a48 100644 (file)
@@ -77,6 +77,7 @@ static int hw_init(void)
 static GSList *hw_scan(GSList *options)
 {
        struct sr_dev_inst *sdi;
+       struct sr_probe *probe;
        struct context *ctx;
        GSList *devices;
        unsigned int i;
@@ -146,6 +147,13 @@ static GSList *hw_scan(GSList *options)
        sdi->driver = cdi;
        sdi->priv = ctx;
 
+       for (i = 0; probe_names[i]; i++) {
+               if (!(probe = sr_probe_new(i, SR_PROBE_ANALOG, TRUE,
+                               probe_names[i])))
+                       return NULL;
+               sdi->probes = g_slist_append(sdi->probes, probe);
+       }
+
        devices = g_slist_append(devices, sdi);
        cdi->instances = g_slist_append(cdi->instances, sdi);
 
@@ -263,10 +271,6 @@ static int hw_info_get(int info_id, const void **data,
        struct context *ctx;
 
        switch (info_id) {
-       case SR_DI_INST:
-               *data = sdi;
-               sr_spew("la8: %s: Returning sdi.", __func__);
-               break;
        case SR_DI_HWCAPS:
                *data = hwcaps;
                break;