]> sigrok.org Git - libsigrok.git/blobdiff - hardware/hantek-dso/api.c
Don't automatically clear known instances from USB drivers on scan
[libsigrok.git] / hardware / hantek-dso / api.c
index abf9db63489a0a0fc9887112cb509ec52ee5471c..e75eec615fe8cbafd7129d364f5538482e67f867 100644 (file)
@@ -269,13 +269,10 @@ static GSList *hw_scan(GSList *options)
        const char *conn;
 
        drvc = di->priv;
-       drvc->instances = NULL;
 
        devcnt = 0;
        devices = 0;
 
-       clear_instances();
-
        conn = NULL;
        for (l = options; l; l = l->next) {
                src = l->data;
@@ -473,7 +470,7 @@ static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi)
        char **targets;
 
        if (sdi->status != SR_ST_ACTIVE)
-               return SR_ERR;
+               return SR_ERR_DEV_CLOSED;
 
        ret = SR_OK;
        devc = sdi->priv;
@@ -926,7 +923,7 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi,
        int i;
 
        if (sdi->status != SR_ST_ACTIVE)
-               return SR_ERR;
+               return SR_ERR_DEV_CLOSED;
 
        devc = sdi->priv;
        devc->cb_data = cb_data;