]> sigrok.org Git - libsigrok.git/commitdiff
Removal of sdi->index, step 4: fix trivial sr_dev_inst_new() calls
authorSoeren Apel <redacted>
Sat, 27 Sep 2014 20:33:00 +0000 (22:33 +0200)
committerBert Vermeulen <redacted>
Mon, 29 Sep 2014 23:42:58 +0000 (01:42 +0200)
39 files changed:
src/hardware/agilent-dmm/api.c
src/hardware/appa-55ii/api.c
src/hardware/asix-sigma/asix-sigma.c
src/hardware/atten-pps3xxx/api.c
src/hardware/beaglelogic/api.c
src/hardware/brymen-bm86x/api.c
src/hardware/brymen-dmm/api.c
src/hardware/cem-dt-885x/api.c
src/hardware/center-3xx/api.c
src/hardware/chronovu-la/api.c
src/hardware/colead-slm/api.c
src/hardware/conrad-digi-35-cpu/api.c
src/hardware/demo/demo.c
src/hardware/fluke-dmm/api.c
src/hardware/fx2lafw/api.c
src/hardware/gmc-mh-1x-2x/api.c
src/hardware/hameg-hmo/api.c
src/hardware/hantek-dso/api.c
src/hardware/ikalogic-scanaplus/api.c
src/hardware/kecheng-kc-330b/api.c
src/hardware/lascar-el-usb/protocol.c
src/hardware/link-mso19/api.c
src/hardware/manson-hcs-3xxx/api.c
src/hardware/mic-985xx/api.c
src/hardware/motech-lps-30x/api.c
src/hardware/norma-dmm/api.c
src/hardware/openbench-logic-sniffer/api.c
src/hardware/openbench-logic-sniffer/protocol.c
src/hardware/pipistrello-ols/protocol.c
src/hardware/rigol-ds/api.c
src/hardware/saleae-logic16/api.c
src/hardware/scpi-pps/api.c
src/hardware/serial-dmm/api.c
src/hardware/teleinfo/api.c
src/hardware/tondaj-sl-814/api.c
src/hardware/uni-t-dmm/api.c
src/hardware/uni-t-ut32x/api.c
src/hardware/yokogawa-dlm/api.c
src/hardware/zeroplus-logic-cube/api.c

index fb40818fc191bea048d056ce7c289802e013df43..e4240e623cdacbb0d76069e531a7bffd30963e66 100644 (file)
@@ -137,7 +137,7 @@ static GSList *scan(GSList *options)
                for (i = 0; supported_agdmm[i].model; i++) {
                        if (strcmp(supported_agdmm[i].modelname, tokens[1]))
                                continue;
-                       if (!(sdi = sr_dev_inst_new(0, SR_ST_INACTIVE, "Agilent",
+                       if (!(sdi = sr_dev_inst_new(SR_ST_INACTIVE, "Agilent",
                                        tokens[1], tokens[3])))
                                return NULL;
                        if (!(devc = g_try_malloc0(sizeof(struct dev_context)))) {
index b96bacfbac5bc6a8aa7748ffb39842e60bc1971d..ab3ad7906575142f6da3da2bc6cd8fcb7b71a392 100644 (file)
@@ -96,7 +96,7 @@ static GSList *scan(GSList *options)
 
        sr_info("Found device on port %s.", conn);
 
-       if (!(sdi = sr_dev_inst_new(0, SR_ST_INACTIVE, "APPA", "55II", NULL)))
+       if (!(sdi = sr_dev_inst_new(SR_ST_INACTIVE, "APPA", "55II", NULL)))
                goto scan_cleanup;
 
        if (!(devc = g_try_malloc0(sizeof(struct dev_context)))) {
index 8965f685de961992c83d18d5cf2bdbac55647d7b..db9f404ee5ac89d1d1efd42c016acb7148850e15 100644 (file)
@@ -377,7 +377,7 @@ static GSList *scan(GSList *options)
        devc->use_triggers = 0;
 
        /* Register SIGMA device. */
-       if (!(sdi = sr_dev_inst_new(0, SR_ST_INITIALIZING, USB_VENDOR_NAME,
+       if (!(sdi = sr_dev_inst_new(SR_ST_INITIALIZING, USB_VENDOR_NAME,
                                    USB_MODEL_NAME, NULL))) {
                sr_err("%s: sdi was NULL", __func__);
                goto free;
index 2e62fb80c0b445147c71a83c9298375a8c0d6f36..75a1fbbd3e3355ce75096fed5b93fc303995c934 100644 (file)
@@ -161,7 +161,7 @@ static GSList *scan(GSList *options, int modelid)
                return NULL;
        }
 
-       sdi = sr_dev_inst_new(0, SR_ST_INACTIVE, "Atten", model->name, NULL);
+       sdi = sr_dev_inst_new(SR_ST_INACTIVE, "Atten", model->name, NULL);
        sdi->driver = di;
        sdi->inst_type = SR_INST_SERIAL;
        sdi->conn = serial;
index 8af44d1e6ffa140109162e42426311e4c6f84051..9abbbefc972e059b0aeaed04e13518182c789392 100644 (file)
@@ -97,7 +97,7 @@ static GSList *scan(GSList *options)
        if (!g_file_test(BEAGLELOGIC_DEV_NODE, G_FILE_TEST_EXISTS))
                return NULL;
 
-       sdi = sr_dev_inst_new(0, SR_ST_INACTIVE, NULL, "BeagleLogic", "1.0");
+       sdi = sr_dev_inst_new(SR_ST_INACTIVE, NULL, "BeagleLogic", "1.0");
        sdi->driver = di;
 
        /* Unless explicitly specified, keep max channels to 8 only */
index d56b76ae514a3aa9ec83ec51f9ad26f8e5c0644f..f22535419fffdc8378c9bda879a2e0f290ada147 100644 (file)
@@ -73,7 +73,7 @@ static GSList *scan(GSList *options)
        for (l = usb_devices; l; l = l->next) {
                usb = l->data;
 
-               if (!(sdi = sr_dev_inst_new(0, SR_ST_INACTIVE,
+               if (!(sdi = sr_dev_inst_new(SR_ST_INACTIVE,
                                            "Brymen", "BM869", NULL))) {
                        sr_err("sr_dev_inst_new returned NULL.");
                        return NULL;
index 553e38b289eae79c4a53436b3bfdf227c292fdeb..0a10956b989a90b99a1f659d59c3c70bdb772f5e 100644 (file)
@@ -75,7 +75,7 @@ static GSList *brymen_scan(const char *conn, const char *serialcomm)
 
        sr_info("Found device on port %s.", conn);
 
-       if (!(sdi = sr_dev_inst_new(0, SR_ST_INACTIVE, "Brymen", "BM85x", NULL)))
+       if (!(sdi = sr_dev_inst_new(SR_ST_INACTIVE, "Brymen", "BM85x", NULL)))
                goto scan_cleanup;
 
        if (!(devc = g_try_malloc0(sizeof(struct dev_context)))) {
index 25e1ce45b3921ba07559351e7eab0832b85a8f7e..70a28e58153de63ed5f4833edb5299ae065f2ebe 100644 (file)
@@ -106,7 +106,7 @@ static GSList *scan(GSList *options)
        while (g_get_monotonic_time() - start < MAX_SCAN_TIME) {
                if (serial_read_nonblocking(serial, &c, 1) == 1 && c == 0xa5) {
                        /* Found one. */
-                       if (!(sdi = sr_dev_inst_new(0, SR_ST_INACTIVE, "CEM",
+                       if (!(sdi = sr_dev_inst_new(SR_ST_INACTIVE, "CEM",
                                        "DT-885x", NULL)))
                                return NULL;
 
index 765819fac486e6ed0170994b9fce75d49bc42599..9226c5a094c269a8f0ca5e8d1857bbdf3dfab167 100644 (file)
@@ -85,7 +85,7 @@ static GSList *center_scan(const char *conn, const char *serialcomm, int idx)
 
        sr_info("Found device on port %s.", conn);
 
-       if (!(sdi = sr_dev_inst_new(0, SR_ST_INACTIVE, center_devs[idx].vendor,
+       if (!(sdi = sr_dev_inst_new(SR_ST_INACTIVE, center_devs[idx].vendor,
                                    center_devs[idx].device, NULL)))
                goto scan_cleanup;
 
index 0a22922d4699c9e8d7d675b2751ed1655a2b0200..594a064919634cca8b524ec618b2f5a8e4944815 100644 (file)
@@ -120,7 +120,7 @@ static int add_device(int idx, int model, GSList **devices)
        devc->cur_samplerate = devc->prof->max_samplerate;
 
        /* Register the device with libsigrok. */
-       sdi = sr_dev_inst_new(0, SR_ST_INITIALIZING,
+       sdi = sr_dev_inst_new(SR_ST_INITIALIZING,
                              "ChronoVu", devc->prof->modelname, NULL);
        if (!sdi) {
                sr_err("Failed to create device instance.");
index 0f4225e5c93af561d2d499f0d9d8d2edf0ee2f81..9ea441781520244c00e52ffaf5a4d5215044fc7d 100644 (file)
@@ -82,7 +82,7 @@ static GSList *scan(GSList *options)
        if (!serialcomm)
                serialcomm = SERIALCOMM;
 
-       if (!(sdi = sr_dev_inst_new(0, SR_ST_INACTIVE, "Colead",
+       if (!(sdi = sr_dev_inst_new(SR_ST_INACTIVE, "Colead",
                        "SL-5868P", NULL)))
                return NULL;
 
index 95b220078f9a17cbea710612cd2290f4c33740bb..e820e253b8dda0511fdf6c8be523884038b4ad95 100644 (file)
@@ -94,7 +94,7 @@ static GSList *scan(GSList *options)
 
        sr_spew("Conrad DIGI 35 CPU assumed at %s.", conn);
 
-       if (!(sdi = sr_dev_inst_new(0, SR_ST_ACTIVE, "Conrad", "DIGI 35 CPU", NULL)))
+       if (!(sdi = sr_dev_inst_new(SR_ST_ACTIVE, "Conrad", "DIGI 35 CPU", NULL)))
                return NULL;
 
        sdi->conn = serial;
index a870c112f28431856a322eb99c80809f9294c36c..73000bc77e96d2000ddc9a0ba64e72082604c4a5 100644 (file)
@@ -287,7 +287,7 @@ static GSList *scan(GSList *options)
        }
 
        devices = NULL;
-       sdi = sr_dev_inst_new(0, SR_ST_ACTIVE, "Demo device", NULL, NULL);
+       sdi = sr_dev_inst_new(SR_ST_ACTIVE, "Demo device", NULL, NULL);
        if (!sdi) {
                sr_err("Device instance creation failed.");
                return NULL;
index 74d477cb95f2505cb8056f2868d69463dca8ecff..55638e7c0894472c8a3a66301a0f78d749f959bd 100644 (file)
@@ -122,7 +122,7 @@ static GSList *fluke_scan(const char *conn, const char *serialcomm)
                                        continue;
                                /* Skip leading spaces in version number. */
                                for (s = 0; tokens[1][s] == ' '; s++);
-                               if (!(sdi = sr_dev_inst_new(0, SR_ST_INACTIVE, "Fluke",
+                               if (!(sdi = sr_dev_inst_new(SR_ST_INACTIVE, "Fluke",
                                                tokens[0] + 6, tokens[1] + s)))
                                        return NULL;
                                if (!(devc = g_try_malloc0(sizeof(struct dev_context)))) {
index 8e28f22494cf146b26cc5e40feba453ab37c1ed3..522a94bf31b151213267316f2945dec6ed9ec044 100644 (file)
@@ -238,7 +238,7 @@ static GSList *scan(GSList *options)
                if (!prof)
                        continue;
 
-               sdi = sr_dev_inst_new(0, SR_ST_INITIALIZING,
+               sdi = sr_dev_inst_new(SR_ST_INITIALIZING,
                        prof->vendor, prof->model, prof->model_version);
                if (!sdi)
                        return NULL;
index a67fb0a8f9d2fb57493b20ec0743cc527eb9ebba..7c7ca88e27b862ba35c0ff655cc0d1c6fed2da34 100644 (file)
@@ -223,7 +223,7 @@ static GSList *scan_1x_2x_rs232(GSList *options)
 
        if (model != METRAHIT_NONE) {
                sr_spew("%s %s detected!", VENDOR_GMC, gmc_model_str(model));
-               if (!(sdi = sr_dev_inst_new(0, SR_ST_INACTIVE, VENDOR_GMC,
+               if (!(sdi = sr_dev_inst_new(SR_ST_INACTIVE, VENDOR_GMC,
                                gmc_model_str(model), NULL)))
                        return NULL;
                if (!(devc = g_try_malloc0(sizeof(struct dev_context)))) {
@@ -303,7 +303,7 @@ static GSList *scan_2x_bd232(GSList *options)
                goto exit_err;
        }
 
-       if (!(sdi = sr_dev_inst_new(0, SR_ST_INACTIVE, VENDOR_GMC, NULL, NULL)))
+       if (!(sdi = sr_dev_inst_new(SR_ST_INACTIVE, VENDOR_GMC, NULL, NULL)))
                goto exit_err;
 
        sdi->priv = devc;
@@ -354,7 +354,7 @@ static GSList *scan_2x_bd232(GSList *options)
                                goto exit_err;
                        }
 
-                       if (!(sdi = sr_dev_inst_new(0, SR_ST_INACTIVE, VENDOR_GMC, NULL, NULL)))
+                       if (!(sdi = sr_dev_inst_new(SR_ST_INACTIVE, VENDOR_GMC, NULL, NULL)))
                                goto exit_err;
                }
        };
index 4ce1fd7fb64b3543e4150ab2fb160284ad75d131..78cdc1733157fc0b5dba9cb47bfd5af67b1b2cf1 100644 (file)
@@ -75,7 +75,7 @@ static struct sr_dev_inst *hmo_probe_serial_device(struct sr_scpi_dev_inst *scpi
        if (check_manufacturer(hw_info->manufacturer) != SR_OK)
                goto fail;
 
-       if (!(sdi = sr_dev_inst_new(0, SR_ST_ACTIVE,
+       if (!(sdi = sr_dev_inst_new(SR_ST_ACTIVE,
                                    hw_info->manufacturer, hw_info->model,
                                    hw_info->firmware_version))) {
                goto fail;
index 3ad928bdd79ac05e2a1d28baf91043b812f92c6f..6f1580940f32afe4dcf6fc66ddedc2aac37fb254 100644 (file)
@@ -166,7 +166,7 @@ static struct sr_dev_inst *dso_dev_new(const struct dso_profile *prof)
        struct dev_context *devc;
        int i;
 
-       sdi = sr_dev_inst_new(0, SR_ST_INITIALIZING,
+       sdi = sr_dev_inst_new(SR_ST_INITIALIZING,
                prof->vendor, prof->model, NULL);
        if (!sdi)
                return NULL;
index 02d5c0432b088e829c420dec499113ea8a8ffc67..95bd3c1a1e4b13e6ca291f09fee046715d47ec34 100644 (file)
@@ -123,7 +123,7 @@ static GSList *scan(GSList *options)
        }
 
        /* Register the device with libsigrok. */
-       sdi = sr_dev_inst_new(0, SR_ST_INITIALIZING,
+       sdi = sr_dev_inst_new(SR_ST_INITIALIZING,
                        USB_VENDOR_NAME, USB_MODEL_NAME, NULL);
        if (!sdi) {
                sr_err("Failed to create device instance.");
index 0dbf198a5f234882b9344c8da5deabce36639ee3..ee3493df0453973deb24cb6b2345054ab1d18ec4 100644 (file)
@@ -129,7 +129,7 @@ static GSList *scan(GSList *options)
                for (l = usb_devices; l; l = l->next) {
                        if (scan_kecheng(l->data, &model) != SR_OK)
                                continue;
-                       if (!(sdi = sr_dev_inst_new(0, SR_ST_INACTIVE, VENDOR,
+                       if (!(sdi = sr_dev_inst_new(SR_ST_INACTIVE, VENDOR,
                                        model, NULL)))
                                return NULL;
                        g_free(model);
index 49c5cd0a3687e3416c8585edd72c1634cca7e204..7459a1f183f8a056888aec197129ff6cc2dbb2aa 100644 (file)
@@ -323,7 +323,7 @@ static struct sr_dev_inst *lascar_identify(unsigned char *config)
                        return NULL;
                }
 
-               if (!(sdi = sr_dev_inst_new(0, SR_ST_INACTIVE, LASCAR_VENDOR,
+               if (!(sdi = sr_dev_inst_new(SR_ST_INACTIVE, LASCAR_VENDOR,
                                profile->modelname, firmware)))
                        return NULL;
                sdi->driver = di;
index 08fcb4b74ac347a9b4dc09ec293061cba506e8fb..29a5952ac03587a153fa9cfa9ce15b1596984b2d 100644 (file)
@@ -203,7 +203,7 @@ static GSList *scan(GSList *options)
                        return devices;
                }
 
-               struct sr_dev_inst *sdi = sr_dev_inst_new(0, SR_ST_INACTIVE,
+               struct sr_dev_inst *sdi = sr_dev_inst_new(SR_ST_INACTIVE,
                                                manufacturer, product, hwrev);
 
                if (!sdi) {
index 58fe7e1f9df40f92c93f9ac066577e580707ad7f..b0dc27338371870c1f3ea0a16c6e375ce7062d76 100644 (file)
@@ -150,7 +150,7 @@ static GSList *scan(GSList *options)
        }
 
        /* Init device instance, etc. */
-       if (!(sdi = sr_dev_inst_new(0, SR_ST_INACTIVE, "Manson",
+       if (!(sdi = sr_dev_inst_new(SR_ST_INACTIVE, "Manson",
                                    models[model_id].name, NULL))) {
                sr_err("Failed to create device instance.");
                return NULL;
index fa3534c4d0bd768108f3882ef898007d7c9d4702..eb5d25d4f2cbec74735604c239c79f3d834490af 100644 (file)
@@ -84,7 +84,7 @@ static GSList *mic_scan(const char *conn, const char *serialcomm, int idx)
        sr_info("Found device on port %s.", conn);
 
        /* TODO: Fill in version from protocol response. */
-       if (!(sdi = sr_dev_inst_new(0, SR_ST_INACTIVE, mic_devs[idx].vendor,
+       if (!(sdi = sr_dev_inst_new(SR_ST_INACTIVE, mic_devs[idx].vendor,
                                    mic_devs[idx].device, NULL)))
                goto scan_cleanup;
 
index f0a0fd876a3b9ea6f471dcec8f9590d952b1e84c..79a32aa4336ada0c9efb9080ad936b151ae756b4 100644 (file)
@@ -444,7 +444,7 @@ static GSList *do_scan(lps_modelid modelid, struct sr_dev_driver *drv, GSList *o
                Therefore just print an error message, but do not exit with error. */
                sr_err("Failed to query for hardware version: %d %s", errno, strerror(errno));
 
-       sdi = sr_dev_inst_new(0, SR_ST_INACTIVE, VENDOR_MOTECH, models[modelid].modelstr, verstr);
+       sdi = sr_dev_inst_new(SR_ST_INACTIVE, VENDOR_MOTECH, models[modelid].modelstr, verstr);
        sdi->driver = drv;
        sdi->inst_type = SR_INST_SERIAL;
        sdi->conn = serial;
index e1929bd70a6069f2885420a39b4a8592e0cc247d..93c9a79d853bcf75ac16cab4bd9b75832529c20e 100644 (file)
@@ -144,7 +144,7 @@ static GSList *do_scan(struct sr_dev_driver* drv, GSList *options)
                        auxtype = xgittoint(buf[7]);
                        sr_spew("%s %s DMM %s detected!", get_brandstr(drv), get_typestr(auxtype, drv), buf + 9);
 
-                       if (!(sdi = sr_dev_inst_new(0, SR_ST_INACTIVE,
+                       if (!(sdi = sr_dev_inst_new(SR_ST_INACTIVE,
                                                get_brandstr(drv), get_typestr(auxtype, drv), buf + 9)))
                                return NULL;
                        if (!(devc = g_try_malloc0(sizeof(struct dev_context)))) {
index ad1dece4402018b338351d6d3c4c8d9b120686bf..8ed13d0013f056caed9a8df674444bd7fe15f52d 100644 (file)
@@ -177,7 +177,7 @@ static GSList *scan(GSList *options)
        } else {
                /* Not an OLS -- some other board that uses the sump protocol. */
                sr_info("Device does not support metadata.");
-               sdi = sr_dev_inst_new(0, SR_ST_INACTIVE,
+               sdi = sr_dev_inst_new(SR_ST_INACTIVE,
                                "Sump", "Logic Analyzer", "v1.0");
                sdi->driver = di;
                for (i = 0; i < 32; i++) {
index 1c94b7ff6948e9103d7caa7cb66878b0f6a76bdd..a20d674b2bea7755a41725a68727ca6860e7199c 100644 (file)
@@ -145,7 +145,7 @@ SR_PRIV struct sr_dev_inst *get_metadata(struct sr_serial_dev_inst *serial)
        GString *tmp_str, *devname, *version;
        guchar tmp_c;
 
-       sdi = sr_dev_inst_new(0, SR_ST_INACTIVE, NULL, NULL, NULL);
+       sdi = sr_dev_inst_new(SR_ST_INACTIVE, NULL, NULL, NULL);
        sdi->driver = di;
        devc = ols_dev_new();
        sdi->priv = devc;
index 53ab5324c03c24a0400e2c405de8b37650823739..62d77e96576ffc88e8507766c3e459ed1527b91d 100644 (file)
@@ -226,7 +226,7 @@ SR_PRIV struct sr_dev_inst *p_ols_get_metadata(uint8_t *buf, int bytes_read, str
        guchar tmp_c;
        int index, i;
 
-       sdi = sr_dev_inst_new(0, SR_ST_INACTIVE, NULL, NULL, NULL);
+       sdi = sr_dev_inst_new(SR_ST_INACTIVE, NULL, NULL, NULL);
        sdi->driver = di;
        sdi->priv = devc;
 
index e943f9b270f12c204507830211cd6764fa825772..eb931e50c4d0309b0cbd5adb6c4fed48a17e83ca 100644 (file)
@@ -291,7 +291,7 @@ static struct sr_dev_inst *probe_device(struct sr_scpi_dev_inst *scpi)
                }
        }
 
-       if (!model || !(sdi = sr_dev_inst_new(0, SR_ST_ACTIVE,
+       if (!model || !(sdi = sr_dev_inst_new(SR_ST_ACTIVE,
                                              model->series->vendor->name,
                                                  model->name,
                                                  hw_info->firmware_version))) {
index e8ce53a877f11fbd72785d7c4088b1a9e9830aeb..bc5a3b9a5228672335e6b427d243c6b24892d316 100644 (file)
@@ -198,7 +198,7 @@ static GSList *scan(GSList *options)
                if (des.idVendor != LOGIC16_VID || des.idProduct != LOGIC16_PID)
                        continue;
 
-               sdi = sr_dev_inst_new(0, SR_ST_INITIALIZING,
+               sdi = sr_dev_inst_new(SR_ST_INITIALIZING,
                                      "Saleae", "Logic16", NULL);
                if (!sdi)
                        return NULL;
index aea3bd5e26833c95cee54ea3c7e850dc98cfcd61..bd7e6d6e983ea48d0a1c7dcca8eed0bbdfbdd163 100644 (file)
@@ -83,7 +83,7 @@ static struct sr_dev_inst *probe_device(struct sr_scpi_dev_inst *scpi)
                return NULL;
        }
 
-       sdi = sr_dev_inst_new(0, SR_ST_ACTIVE, vendor, hw_info->model,
+       sdi = sr_dev_inst_new(SR_ST_ACTIVE, vendor, hw_info->model,
                        hw_info->firmware_version);
        sdi->conn = scpi;
        sdi->driver = di;
index 478110017f77d7a85eef4ce387ce2c925a402bba..7fdfd50e9849ef694a6a1364e1ec4d3388803266 100644 (file)
@@ -397,7 +397,7 @@ static GSList *sdmm_scan(const char *conn, const char *serialcomm, int dmm)
 
        sr_info("Found device on port %s.", conn);
 
-       if (!(sdi = sr_dev_inst_new(0, SR_ST_INACTIVE, dmms[dmm].vendor,
+       if (!(sdi = sr_dev_inst_new(SR_ST_INACTIVE, dmms[dmm].vendor,
                                    dmms[dmm].device, NULL)))
                goto scan_cleanup;
 
index 77cd5f8d7e9c91386d59ff1fe4d7147b047eec9c..63432f58d922632c6de71096be4ab76ed0b2f288 100644 (file)
@@ -92,7 +92,7 @@ static GSList *scan(GSList *options)
 
        sr_info("Found device on port %s.", conn);
 
-       if (!(sdi = sr_dev_inst_new(0, SR_ST_INACTIVE, "EDF", "Teleinfo", NULL)))
+       if (!(sdi = sr_dev_inst_new(SR_ST_INACTIVE, "EDF", "Teleinfo", NULL)))
                goto scan_cleanup;
 
        if (!(devc = g_try_malloc0(sizeof(struct dev_context)))) {
index 75d2d35301e8bb8a468b64608d273a8bbeec340c..4578c21f1c4a7f68ac495deadcf65dbcaffc2c70 100644 (file)
@@ -84,7 +84,7 @@ static GSList *scan(GSList *options)
        if (!serialcomm)
                serialcomm = SERIALCOMM;
 
-       if (!(sdi = sr_dev_inst_new(0, SR_ST_INACTIVE, "Tondaj",
+       if (!(sdi = sr_dev_inst_new(SR_ST_INACTIVE, "Tondaj",
                                    "SL-814", NULL))) {
                sr_err("Failed to create device instance.");
                return NULL;
index 440a7ec1962b45e4bfebf881be11d0fa673fe9b1..f09710e6fbb7d1b5463245a4e5e14e75c2da9bff 100644 (file)
@@ -212,7 +212,7 @@ static GSList *scan(GSList *options, int dmm)
 
                devc->first_run = TRUE;
 
-               if (!(sdi = sr_dev_inst_new(0, SR_ST_INACTIVE,
+               if (!(sdi = sr_dev_inst_new(SR_ST_INACTIVE,
                                udmms[dmm].vendor, udmms[dmm].device, NULL))) {
                        sr_err("sr_dev_inst_new returned NULL.");
                        return NULL;
index ab82b779e035b40a1aa1948a5373c7d5189facac..ab1618e872fe99a9e738ee390bc1536875894dd9 100644 (file)
@@ -79,7 +79,7 @@ static GSList *scan(GSList *options)
                /* We have a list of sr_usb_dev_inst matching the connection
                 * string. Wrap them in sr_dev_inst and we're done. */
                for (l = usb_devices; l; l = l->next) {
-                       if (!(sdi = sr_dev_inst_new(0, SR_ST_INACTIVE, VENDOR,
+                       if (!(sdi = sr_dev_inst_new(SR_ST_INACTIVE, VENDOR,
                                        MODEL, NULL)))
                                return NULL;
                        sdi->driver = di;
index 3cf5a2be41e3d14e6d24ccd11261bc05b5171a1e..dfecfb18af0ec251d13e1f1dca68a23d017e2681 100644 (file)
@@ -62,7 +62,7 @@ static struct sr_dev_inst *probe_usbtmc_device(struct sr_scpi_dev_inst *scpi)
        if (dlm_model_get(hw_info->model, &model_name, &model_index) != SR_OK)
                goto fail;
 
-       if (!(sdi = sr_dev_inst_new(0, SR_ST_ACTIVE, MANUFACTURER_NAME,
+       if (!(sdi = sr_dev_inst_new(SR_ST_ACTIVE, MANUFACTURER_NAME,
                        model_name, NULL)))
                goto fail;
 
index 19cf862e19da675a4d092099b0cf74a42ff356d1..9789713d8c34c9163e47478acc113334dceedff3 100644 (file)
@@ -221,7 +221,7 @@ static GSList *scan(GSList *options)
                sr_info("Found ZEROPLUS %s.", prof->model_name);
 
                /* Register the device with libsigrok. */
-               if (!(sdi = sr_dev_inst_new(0, SR_ST_INACTIVE,
+               if (!(sdi = sr_dev_inst_new(SR_ST_INACTIVE,
                                VENDOR_NAME, prof->model_name, NULL))) {
                        sr_err("%s: sr_dev_inst_new failed", __func__);
                        return NULL;