From: Uwe Hermann Date: Thu, 6 Jul 2017 18:30:09 +0000 (+0200) Subject: newdriver: Drop obsolete checks and code chunks. X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=f6b99cb8bd9b84fb47d15cedc32f97832bdc13ba;p=sigrok-util.git newdriver: Drop obsolete checks and code chunks. This is now handled via wrappers that the whole code-base uses. --- diff --git a/source/drv-api.c b/source/drv-api.c index daaded9..7b90c19 100644 --- a/source/drv-api.c +++ b/source/drv-api.c @@ -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;