]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/ikalogic-scanalogic2/api.c
sr_dev_open(): Set status to SR_ST_ACTIVE upon success.
[libsigrok.git] / src / hardware / ikalogic-scanalogic2 / api.c
index c82422a553ed38dc1a6bf7c810130e6812727643..d13abf310ed159c011f9ad8e4da26a12fe7cdbf8 100644 (file)
@@ -232,8 +232,6 @@ static int dev_open(struct sr_dev_inst *sdi)
                return SR_ERR;
        }
 
-       sdi->status = SR_ST_ACTIVE;
-
        return SR_OK;
 }
 
@@ -288,9 +286,6 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd
 
        (void)cg;
 
-       if (sdi->status != SR_ST_ACTIVE)
-               return SR_ERR_DEV_CLOSED;
-
        switch (key) {
        case SR_CONF_LIMIT_SAMPLES:
                limit_samples = g_variant_get_uint64(data);
@@ -361,9 +356,6 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi)
        unsigned int i, j;
        int ret;
 
-       if (sdi->status != SR_ST_ACTIVE)
-               return SR_ERR_DEV_CLOSED;
-
        devc = sdi->priv;
        drvc = di->context;
 
@@ -443,11 +435,6 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi)
 
 static int dev_acquisition_stop(struct sr_dev_inst *sdi)
 {
-       if (sdi->status != SR_ST_ACTIVE)
-               return SR_ERR_DEV_CLOSED;
-
-       sr_dbg("Stopping acquisition.");
-
        sdi->status = SR_ST_STOPPING;
 
        return SR_OK;