From: Uwe Hermann Date: Wed, 29 Aug 2018 22:50:35 +0000 (+0200) Subject: ipdbg-la: Drop unneeded sdi->status handling. X-Git-Url: https://sigrok.org/gitweb/?a=commitdiff_plain;h=13ac501acd929854fc59fdf8addec66b3eabeb36;p=libsigrok.git ipdbg-la: Drop unneeded sdi->status handling. This is already done by the backend wrapper functions. --- diff --git a/src/hardware/ipdbg-la/api.c b/src/hardware/ipdbg-la/api.c index 62d0616e..6a8f261b 100644 --- a/src/hardware/ipdbg-la/api.c +++ b/src/hardware/ipdbg-la/api.c @@ -158,8 +158,6 @@ static int dev_clear(const struct sr_dev_driver *di) static int dev_open(struct sr_dev_inst *sdi) { - sdi->status = SR_ST_INACTIVE; - struct ipdbg_la_tcp *tcp = sdi->conn; if (!tcp) @@ -168,21 +166,18 @@ static int dev_open(struct sr_dev_inst *sdi) if (ipdbg_la_tcp_open(tcp) != SR_OK) return SR_ERR; - sdi->status = SR_ST_ACTIVE; - return SR_OK; } static int dev_close(struct sr_dev_inst *sdi) { - // Should be called before a new call to scan() + /* Should be called before a new call to scan(). */ struct ipdbg_la_tcp *tcp = sdi->conn; if (tcp) ipdbg_la_tcp_close(tcp); sdi->conn = NULL; - sdi->status = SR_ST_INACTIVE; return SR_OK; } @@ -215,9 +210,6 @@ static int config_set(uint32_t key, GVariant *data, (void)cg; - if (sdi->status != SR_ST_ACTIVE) - return SR_ERR_DEV_CLOSED; - switch (key) { case SR_CONF_CAPTURE_RATIO: devc->capture_ratio = g_variant_get_uint64(data); @@ -261,9 +253,6 @@ static GSList *dev_list(const struct sr_dev_driver *di) static int dev_acquisition_start(const struct sr_dev_inst *sdi) { - if (sdi->status != SR_ST_ACTIVE) - return SR_ERR_DEV_CLOSED; - struct ipdbg_la_tcp *tcp = sdi->conn; struct dev_context *devc = sdi->priv;