X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fscpi-pps%2Fapi.c;h=2746dc4019dc01b5c1f9a56446b536a882a724b8;hb=093e1cba6b7bf14cfb77fa36f59b0c16e6fca7cc;hp=5bce3af0d3f092bb35b861c06c5b1f60b9d5d6c4;hpb=bee2b0168c087676c1b365861d8c2d4714afa9b9;p=libsigrok.git diff --git a/src/hardware/scpi-pps/api.c b/src/hardware/scpi-pps/api.c index 5bce3af0..2746dc40 100644 --- a/src/hardware/scpi-pps/api.c +++ b/src/hardware/scpi-pps/api.c @@ -43,9 +43,8 @@ static const struct pps_channel_instance pci[] = { }; static struct sr_dev_inst *probe_device(struct sr_scpi_dev_inst *scpi, - int (*get_hw_id)(struct sr_scpi_dev_inst *scpi, - struct sr_scpi_hw_info **scpi_response) - ) + int (*get_hw_id)(struct sr_scpi_dev_inst *scpi, + struct sr_scpi_hw_info **scpi_response)) { struct dev_context *devc; struct sr_dev_inst *sdi; @@ -281,9 +280,6 @@ static int dev_close(struct sr_dev_inst *sdi) struct sr_scpi_dev_inst *scpi; struct dev_context *devc; - if (sdi->status != SR_ST_ACTIVE) - return SR_ERR_DEV_CLOSED; - devc = sdi->priv; scpi = sdi->conn; if (scpi) { @@ -451,9 +447,6 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd if (!sdi) return SR_ERR_ARG; - if (sdi->status != SR_ST_ACTIVE) - return SR_ERR_DEV_CLOSED; - if (cg) /* Channel group specified. */ select_channel(sdi, cg->channels->data); @@ -643,9 +636,6 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi) struct pps_channel *pch; int cmd, ret; - if (sdi->status != SR_ST_ACTIVE) - return SR_ERR_DEV_CLOSED; - devc = sdi->priv; scpi = sdi->conn; @@ -679,9 +669,6 @@ static int dev_acquisition_stop(struct sr_dev_inst *sdi) struct sr_scpi_dev_inst *scpi; float f; - if (sdi->status != SR_ST_ACTIVE) - return SR_ERR_DEV_CLOSED; - scpi = sdi->conn; /*