ipdbg-la: Drop unneeded sdi->status handling.

This is already done by the backend wrapper functions.
This commit is contained in:
Uwe Hermann 2018-08-30 00:50:35 +02:00
parent 77b6b98d1c
commit 13ac501acd
1 changed files with 1 additions and 12 deletions

View File

@ -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;