]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/hantek-dso/api.c
dev_clear(): Consistently name callback 'clear_helper()'.
[libsigrok.git] / src / hardware / hantek-dso / api.c
index 119e8274e517b5804b4ce9c1f0dea423bb1f6120..ea07b546fd57547514d2f310bb38c5123609b619 100644 (file)
@@ -232,19 +232,18 @@ 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;
 
        devc = priv;
        g_free(devc->triggersource);
        g_slist_free(devc->enabled_channels);
-
 }
 
 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)
@@ -491,9 +490,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) {