]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/hameg-hmo/api.c
scpi: Move closing of discovered devices to sr_scpi_scan_resource().
[libsigrok.git] / src / hardware / hameg-hmo / api.c
index 7a2d91c7cc631d7c1d4997148d4de3782a9d5140..415f945b12c9a9a693fe8b19e0178789820573a6 100644 (file)
@@ -81,7 +81,6 @@ static struct sr_dev_inst *hmo_probe_serial_device(struct sr_scpi_dev_inst *scpi
                goto fail;
 
        sdi = g_malloc0(sizeof(struct sr_dev_inst));
-       sdi->status = SR_ST_ACTIVE;
        sdi->vendor = g_strdup(hw_info->manufacturer);
        sdi->model = g_strdup(hw_info->model);
        sdi->version = g_strdup(hw_info->firmware_version);
@@ -100,10 +99,6 @@ static struct sr_dev_inst *hmo_probe_serial_device(struct sr_scpi_dev_inst *scpi
        if (hmo_init_device(sdi) != SR_OK)
                goto fail;
 
-       sr_scpi_close(sdi->conn);
-
-       sdi->status = SR_ST_INACTIVE;
-
        return sdi;
 
 fail: