X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fhardware%2Flecroy-xstream%2Fapi.c;h=cf9df601e36932d233296fe513dddc9bd4a12aee;hb=6e43c3d5318a8ff320bf6539a9efe7f0b8497e2f;hp=075fff76fb9816d11e5a2ceab2ba83f33167a606;hpb=6402c379161ec138e451901c411817a55846a75b;p=libsigrok.git diff --git a/src/hardware/lecroy-xstream/api.c b/src/hardware/lecroy-xstream/api.c index 075fff76..cf9df601 100644 --- a/src/hardware/lecroy-xstream/api.c +++ b/src/hardware/lecroy-xstream/api.c @@ -130,7 +130,7 @@ static void clear_helper(void *priv) static int dev_clear(const struct sr_dev_driver *di) { - return std_dev_clear(di, clear_helper); + return std_dev_clear_with_callback(di, clear_helper); } static int dev_open(struct sr_dev_inst *sdi) @@ -141,18 +141,12 @@ static int dev_open(struct sr_dev_inst *sdi) 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,