]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/sysclk-lwla/api.c
sr_dev_close(): Factor out SR_ERR_DEV_CLOSED check.
[libsigrok.git] / src / hardware / sysclk-lwla / api.c
index 1da4b00eb86698e4707996e0695a816f85701064..da2019fba31eb51fbc44b82d1a37cae4309168c5 100644 (file)
@@ -343,10 +343,6 @@ static int dev_close(struct sr_dev_inst *sdi)
        devc = sdi->priv;
        usb = sdi->conn;
 
-       if (sdi->status == SR_ST_INACTIVE) {
-               sr_dbg("Device already closed.");
-               return SR_OK;
-       }
        if (devc->acquisition) {
                sr_err("Cannot close device during acquisition!");
                /* Request stop, leak handle, and prepare for the worst. */
@@ -645,9 +641,6 @@ static int config_commit(const struct sr_dev_inst *sdi)
 
        devc = sdi->priv;
 
-       if (sdi->status != SR_ST_ACTIVE)
-               return SR_ERR_DEV_CLOSED;
-
        if (devc->acquisition) {
                sr_err("Acquisition still in progress?");
                return SR_ERR;
@@ -743,11 +736,6 @@ static int config_list(uint32_t key, GVariant **data,
  */
 static int dev_acquisition_start(const struct sr_dev_inst *sdi)
 {
-       if (sdi->status != SR_ST_ACTIVE)
-               return SR_ERR_DEV_CLOSED;
-
-       sr_info("Starting acquisition.");
-
        return lwla_start_acquisition(sdi);
 }