]> sigrok.org Git - sigrok-util.git/blobdiff - source/drv-api.c
newdriver: Drop obsolete checks and code chunks.
[sigrok-util.git] / source / drv-api.c
index daaded9154890161537951b8e301bf2b78942ff8..7b90c197e8536028b33158341ace6814130911ec 100644 (file)
@@ -50,8 +50,6 @@ static int dev_open(struct sr_dev_inst *sdi)
 
        /* TODO: get handle from sdi->conn and open it. */
 
-       sdi->status = SR_ST_ACTIVE;
-
        return SR_OK;
 }}
 
@@ -61,8 +59,6 @@ static int dev_close(struct sr_dev_inst *sdi)
 
        /* TODO: get handle from sdi->conn and close it. */
 
-       sdi->status = SR_ST_INACTIVE;
-
        return SR_OK;
 }}
 
@@ -93,9 +89,6 @@ static int config_set(uint32_t key, GVariant *data,
        (void)data;
        (void)cg;
 
-       if (sdi->status != SR_ST_ACTIVE)
-               return SR_ERR_DEV_CLOSED;
-
        ret = SR_OK;
        switch (key) {{
        /* TODO */
@@ -127,9 +120,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;
-
        /* TODO: configure hardware, reset acquisition state, set up
         * callbacks and send header packet. */
 
@@ -138,9 +128,6 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi)
 
 static int dev_acquisition_stop(struct sr_dev_inst *sdi)
 {{
-       if (sdi->status != SR_ST_ACTIVE)
-               return SR_ERR_DEV_CLOSED;
-
        /* TODO: stop acquisition. */
 
        return SR_OK;