]> sigrok.org Git - libsigrok.git/commitdiff
siglent-sds: Drop obsolete SR_ST_ACTIVE checks.
authorUwe Hermann <redacted>
Sat, 17 Feb 2018 16:47:28 +0000 (17:47 +0100)
committerUwe Hermann <redacted>
Sat, 17 Feb 2018 18:10:19 +0000 (19:10 +0100)
These are now done in the wrapper functions.

src/hardware/siglent-sds/api.c

index 648c6e5916bf9a1a716c6522bf95020667cc32b1..a1b1ed71d4c490aed37dfa145275d92f59830b22 100644 (file)
@@ -371,8 +371,6 @@ static int dev_open(struct sr_dev_inst *sdi)
                return SR_ERR;
        }
 
-       sdi->status = SR_ST_ACTIVE;
-
        return SR_OK;
 }
 
@@ -535,9 +533,6 @@ static int config_set(uint32_t key, GVariant *data,
 
        devc = sdi->priv;
 
-       if (sdi->status != SR_ST_ACTIVE)
-               return SR_ERR_DEV_CLOSED;
-
        /* If a channel group is specified, it must be a valid one. */
        if (cg && !g_slist_find(sdi->channel_groups, cg)) {
                sr_err("Invalid channel group specified.");
@@ -870,9 +865,6 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi)
        gboolean some_digital;
        GSList *l, *d;
 
-       if (sdi->status != SR_ST_ACTIVE)
-               return SR_ERR_DEV_CLOSED;
-
        scpi = sdi->conn;
        devc = sdi->priv;
 
@@ -980,11 +972,6 @@ static int dev_acquisition_stop(struct sr_dev_inst *sdi)
 
        devc = sdi->priv;
 
-       if (sdi->status != SR_ST_ACTIVE) {
-               sr_err("Device inactive, can't stop acquisition.");
-               return SR_ERR;
-       }
-
        std_session_send_df_end(sdi);
 
        g_slist_free(devc->enabled_channels);