X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Flecroy-xstream%2Fapi.c;h=245c421a967484f67d5fa5292575fd53b145e72b;hb=f1ba6b4b2c9a8ecf90bb31efb218752aa7e49d1a;hp=480866474b747791957df86f201b4912dc17c205;hpb=093e1cba6b7bf14cfb77fa36f59b0c16e6fca7cc;p=libsigrok.git diff --git a/src/hardware/lecroy-xstream/api.c b/src/hardware/lecroy-xstream/api.c index 48086647..245c421a 100644 --- a/src/hardware/lecroy-xstream/api.c +++ b/src/hardware/lecroy-xstream/api.c @@ -135,24 +135,18 @@ static int dev_clear(const struct sr_dev_driver *di) static int dev_open(struct sr_dev_inst *sdi) { - if (sdi->status != SR_ST_ACTIVE && sr_scpi_open(sdi->conn) != SR_OK) + if (sr_scpi_open(sdi->conn) != SR_OK) return SR_ERR; if (lecroy_xstream_state_get(sdi) != SR_OK) return SR_ERR; - sdi->status = SR_ST_ACTIVE; - return SR_OK; } static int dev_close(struct sr_dev_inst *sdi) { - sr_scpi_close(sdi->conn); - - sdi->status = SR_ST_INACTIVE; - - return SR_OK; + return sr_scpi_close(sdi->conn); } static int config_get(uint32_t key, GVariant **data,