X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fyokogawa-dlm%2Fapi.c;h=21fa1657acb7779ee461114cb422f71a35a09daa;hb=16fc7ee29ffa196d29a20fddd81234792f88b12c;hp=382762b6a5c2dbe868d463bc7a79d51af69892d0;hpb=41812aca436805b0614f2a8f31cf2f8ce494aea0;p=libsigrok.git diff --git a/src/hardware/yokogawa-dlm/api.c b/src/hardware/yokogawa-dlm/api.c index 382762b6..21fa1657 100644 --- a/src/hardware/yokogawa-dlm/api.c +++ b/src/hardware/yokogawa-dlm/api.c @@ -18,7 +18,9 @@ * along with this program. If not, see . */ +#include #include +#include "scpi.h" #include "protocol.h" SR_PRIV struct sr_dev_driver yokogawa_dlm_driver_info; @@ -90,7 +92,6 @@ static struct sr_dev_inst *probe_usbtmc_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(MANUFACTURER_NAME); sdi->model = g_strdup(model_name); sdi->version = g_strdup(hw_info->firmware_version); @@ -110,9 +111,6 @@ static struct sr_dev_inst *probe_usbtmc_device(struct sr_scpi_dev_inst *scpi) if (dlm_device_init(sdi, model_index) != SR_OK) goto fail; - sr_scpi_close(sdi->conn); - - sdi->status = SR_ST_INACTIVE; return sdi; fail: @@ -234,7 +232,6 @@ static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *s if ((cg_type = check_channel_group(devc, cg)) == CG_INVALID) return SR_ERR; - ret = SR_ERR_NA; model = devc->model_config; state = devc->model_state;