]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/conrad-digi-35-cpu/api.c
sr_config_set(): Factor out SR_ERR_DEV_CLOSED check.
[libsigrok.git] / src / hardware / conrad-digi-35-cpu / api.c
index d50b446ea52d9e3e9044fe5432dad0231ede3768..cc5e4ebf35d02b2de3894b64c73819475f65b756 100644 (file)
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-/** @file
- *  <em>Conrad DIGI 35 CPU</em> power supply driver
- *  @internal
+/**
+ * @file
+ *
+ * <em>Conrad DIGI 35 CPU</em> power supply driver
+ *
+ * @internal
  */
 
 #include <config.h>
@@ -100,9 +103,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_VOLTAGE:
                dblval = g_variant_get_double(data);
@@ -160,16 +160,14 @@ static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *
 
 static int dev_acquisition_start(const struct sr_dev_inst *sdi)
 {
-       if (sdi->status != SR_ST_ACTIVE)
-               return SR_ERR_DEV_CLOSED;
+       (void)sdi;
 
        return SR_OK;
 }
 
 static int dev_acquisition_stop(struct sr_dev_inst *sdi)
 {
-       if (sdi->status != SR_ST_ACTIVE)
-               return SR_ERR_DEV_CLOSED;
+       (void)sdi;
 
        return SR_OK;
 }