]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/hantek-6xxx/api.c
dev_clear(): Consistently name callback 'clear_helper()'.
[libsigrok.git] / src / hardware / hantek-6xxx / api.c
index e4e20e0a84da803a6adc9cc22cfcaa8add5e66a6..ad407a2e29825983a70550f00b03615d0a04f187 100644 (file)
@@ -156,7 +156,7 @@ static int configure_channels(const struct sr_dev_inst *sdi)
        return SR_OK;
 }
 
-static void clear_dev_context(void *priv)
+static void clear_helper(void *priv)
 {
        struct dev_context *devc;
 
@@ -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_helper);
 }
 
 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) {