X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fhantek-dso%2Fapi.c;h=ea07b546fd57547514d2f310bb38c5123609b619;hb=53279f13e4694fcf2aba314baade418941b0bc3e;hp=119e8274e517b5804b4ce9c1f0dea423bb1f6120;hpb=f670835f1fbc03525e995d6970a5495976ab7c1a;p=libsigrok.git diff --git a/src/hardware/hantek-dso/api.c b/src/hardware/hantek-dso/api.c index 119e8274..ea07b546 100644 --- a/src/hardware/hantek-dso/api.c +++ b/src/hardware/hantek-dso/api.c @@ -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) {