]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/gwinstek-gds-800/api.c
sr_dev_open(): Set status to SR_ST_ACTIVE upon success.
[libsigrok.git] / src / hardware / gwinstek-gds-800 / api.c
index d8b00f9abcf86af42a34248e3c01e3f0d4aa5602..30407c3f4c61fa18b7c651cf68c4149a20589005 100644 (file)
@@ -98,8 +98,6 @@ static int dev_open(struct sr_dev_inst *sdi)
                return SR_ERR;
        }
 
-       sdi->status = SR_ST_ACTIVE;
-
        return SR_OK;
 }
 
@@ -107,9 +105,6 @@ static int dev_close(struct sr_dev_inst *sdi)
 {
        struct sr_scpi_dev_inst *scpi;
 
-       if (sdi->status != SR_ST_ACTIVE)
-               return SR_ERR_DEV_CLOSED;
-
        scpi = sdi->conn;
        if (scpi) {
                if (sr_scpi_close(scpi) < 0)
@@ -153,9 +148,6 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd
        if (!sdi)
                return SR_ERR_ARG;
 
-       if (sdi->status != SR_ST_ACTIVE)
-               return SR_ERR_DEV_CLOSED;
-
        devc = sdi->priv;
 
        switch (key) {