From: Uwe Hermann Date: Sat, 17 Feb 2018 16:47:28 +0000 (+0100) Subject: siglent-sds: Drop obsolete SR_ST_ACTIVE checks. X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=8856f173dfa00ecb520e33cc9fa5fcfc0302d0ce;p=libsigrok.git siglent-sds: Drop obsolete SR_ST_ACTIVE checks. These are now done in the wrapper functions. --- diff --git a/src/hardware/siglent-sds/api.c b/src/hardware/siglent-sds/api.c index 648c6e59..a1b1ed71 100644 --- a/src/hardware/siglent-sds/api.c +++ b/src/hardware/siglent-sds/api.c @@ -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);