]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/hantek-6xxx/api.c
std: Add and use std_dev_clear() where possible.
[libsigrok.git] / src / hardware / hantek-6xxx / api.c
index 025695e1df41cf1b913664be95e5e38e85752545..e815603fac7ba6cf4a497b9ca35ef1600a6352e5 100644 (file)
@@ -167,7 +167,7 @@ static void clear_dev_context(void *priv)
 
 static int dev_clear(const struct sr_dev_driver *di)
 {
-       return std_dev_clear(di, clear_dev_context);
+       return std_dev_clear_with_callback(di, clear_dev_context);
 }
 
 static GSList *scan(struct sr_dev_driver *di, GSList *options)
@@ -401,9 +401,6 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd
        unsigned int i;
        const char *tmp_str;
 
-       if (sdi->status != SR_ST_ACTIVE)
-               return SR_ERR_DEV_CLOSED;
-
        ret = SR_OK;
        devc = sdi->priv;
        if (!cg) {
@@ -784,9 +781,6 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi)
        struct sr_dev_driver *di = sdi->driver;
        struct drv_context *drvc = di->context;
 
-       if (sdi->status != SR_ST_ACTIVE)
-               return SR_ERR_DEV_CLOSED;
-
        devc = sdi->priv;
 
        if (configure_channels(sdi) != SR_OK) {