]> sigrok.org Git - libsigrok.git/blobdiff - hardware/asix-sigma/asix-sigma.c
sr/drivers: fix off-by-one if frontend-initiated probe configuration
[libsigrok.git] / hardware / asix-sigma / asix-sigma.c
index b174eaff050b8c4db4e202d8ac6e9426331be65c..5cb6130c29ae8723bbbab76ae310228848314a6b 100644 (file)
@@ -683,7 +683,7 @@ static int configure_probes(const struct sr_dev_inst *sdi, const GSList *probes)
 
        for (l = probes; l; l = l->next) {
                probe = (struct sr_probe *)l->data;
-               probebit = 1 << (probe->index - 1);
+               probebit = 1 << (probe->index);
 
                if (!probe->enabled || !probe->trigger)
                        continue;
@@ -809,17 +809,6 @@ static int hw_info_get(int info_id, const void **data,
        return SR_OK;
 }
 
-static int hw_dev_status_get(int dev_index)
-{
-       struct sr_dev_inst *sdi;
-
-       sdi = sr_dev_inst_get(adi->instances, dev_index);
-       if (sdi)
-               return sdi->status;
-       else
-               return SR_ST_NOT_FOUND;
-}
-
 static int hw_dev_config_set(const struct sr_dev_inst *sdi, int hwcap,
                const void *value)
 {
@@ -1447,7 +1436,6 @@ SR_PRIV struct sr_dev_driver asix_sigma_driver_info = {
        .dev_open = hw_dev_open,
        .dev_close = hw_dev_close,
        .info_get = hw_info_get,
-       .dev_status_get = hw_dev_status_get,
        .dev_config_set = hw_dev_config_set,
        .dev_acquisition_start = hw_dev_acquisition_start,
        .dev_acquisition_stop = hw_dev_acquisition_stop,