X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fscpi-pps%2Fapi.c;h=a29744edefa0b79e6744906b414121511de0a37d;hb=6cc931283d952be755c02db84044ce1f95e8426d;hp=fb6a36e2baee4807f3872da0a56186ed8118eb20;hpb=069d9f25d9f63e35885a7e4c83e8587f0356d8f9;p=libsigrok.git diff --git a/src/hardware/scpi-pps/api.c b/src/hardware/scpi-pps/api.c index fb6a36e2..a29744ed 100644 --- a/src/hardware/scpi-pps/api.c +++ b/src/hardware/scpi-pps/api.c @@ -91,7 +91,6 @@ static struct sr_dev_inst *probe_device(struct sr_scpi_dev_inst *scpi) } sdi = g_malloc0(sizeof(struct sr_dev_inst)); - sdi->status = SR_ST_INACTIVE; sdi->vendor = g_strdup(vendor); sdi->model = g_strdup(hw_info->model); sdi->version = g_strdup(hw_info->firmware_version); @@ -168,7 +167,6 @@ static struct sr_dev_inst *probe_device(struct sr_scpi_dev_inst *scpi) hw_info = NULL; scpi_cmd(sdi, devc->device->commands, SCPI_CMD_LOCAL); - sr_scpi_close(scpi); return sdi; } @@ -402,7 +400,7 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd select_channel(sdi, cg->channels->data); devc = sdi->priv; - ret = SR_OK; + switch (key) { case SR_CONF_ENABLED: if (g_variant_get_boolean(data))