]> sigrok.org Git - libsigrok.git/blobdiff - hardware/rigol-ds/api.c
scpi: add a generic scan API and implement it in usbtmc and serial transport
[libsigrok.git] / hardware / rigol-ds / api.c
index ae14f067d3d1e2d2284009be4bdc3ba581573241..0f319cbd0902c5bce5d5c8c4eaee190ebf6a642b 100644 (file)
@@ -269,7 +269,7 @@ static int probe_port(const char *resource, const char *serialcomm, GSList **dev
 
        *devices = NULL;
 
-       if (!(scpi = scpi_dev_inst_new(resource, serialcomm)))
+       if (!(scpi = scpi_dev_inst_new(di->priv, resource, serialcomm)))
                return SR_ERR;
 
        if (sr_scpi_open(scpi) != SR_OK) {
@@ -488,7 +488,7 @@ static int dev_close(struct sr_dev_inst *sdi)
        scpi = sdi->conn;
        devc = sdi->priv;
 
-       if (devc->model->series->protocol >= PROTOCOL_V2)
+       if (devc->model->series->protocol == PROTOCOL_V2)
                rigol_ds_config_set(sdi, ":KEY:LOCK DISABLE");
 
        if (scpi) {