X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fhung-chang-dso-2100%2Fapi.c;h=0aa012a1a3b54e90d1ed3a15137aa565e8eefac0;hb=f1ba6b4b2c9a8ecf90bb31efb218752aa7e49d1a;hp=159c8f6ac6457f83e5f144c60100e11adf0d80de;hpb=c3cd66a00cdb4afbd43108563d979eebfbafaf69;p=libsigrok.git diff --git a/src/hardware/hung-chang-dso-2100/api.c b/src/hardware/hung-chang-dso-2100/api.c index 159c8f6a..0aa012a1 100644 --- a/src/hardware/hung-chang-dso-2100/api.c +++ b/src/hardware/hung-chang-dso-2100/api.c @@ -246,9 +246,6 @@ static int dev_open(struct sr_dev_inst *sdi) struct dev_context *devc = sdi->priv; int i; - if (sdi->status != SR_ST_INACTIVE) - goto fail1; - if (ieee1284_open(sdi->conn, 0, &i) != E1284_OK) goto fail1; @@ -265,8 +262,6 @@ static int dev_open(struct sr_dev_inst *sdi) if (!devc->samples) goto fail3; - sdi->status = SR_ST_ACTIVE; - return SR_OK; fail3: @@ -282,14 +277,10 @@ static int dev_close(struct sr_dev_inst *sdi) { struct dev_context *devc = sdi->priv; - if (sdi->status != SR_ST_ACTIVE) - return SR_OK; - g_free(devc->samples); hung_chang_dso_2100_reset_port(sdi->conn); ieee1284_release(sdi->conn); ieee1284_close(sdi->conn); - sdi->status = SR_ST_INACTIVE; return SR_OK; } @@ -546,9 +537,6 @@ static int config_commit(const struct sr_dev_inst *sdi) uint8_t state = hung_chang_dso_2100_read_mbox(sdi->conn, 0.02); int ret; - if (sdi->status != SR_ST_ACTIVE) - return SR_ERR_DEV_CLOSED; - switch (state) { case 0x03: case 0x14: