X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fbeaglelogic%2Fapi.c;h=2b11fdc7d12eb501a4f491f6f85faa76d048b11b;hb=53279f13e4694fcf2aba314baade418941b0bc3e;hp=09fcf0bdb5577459d49b2f7602b8ba03aaa0ff51;hpb=c3cd66a00cdb4afbd43108563d979eebfbafaf69;p=libsigrok.git diff --git a/src/hardware/beaglelogic/api.c b/src/hardware/beaglelogic/api.c index 09fcf0bd..2b11fdc7 100644 --- a/src/hardware/beaglelogic/api.c +++ b/src/hardware/beaglelogic/api.c @@ -157,8 +157,6 @@ static int dev_open(struct sr_dev_inst *sdi) return SR_ERR; } - /* We're good to go now */ - sdi->status = SR_ST_ACTIVE; return SR_OK; } @@ -166,12 +164,10 @@ static int dev_close(struct sr_dev_inst *sdi) { struct dev_context *devc = sdi->priv; - if (sdi->status == SR_ST_ACTIVE) { - /* Close the memory mapping and the file */ - beaglelogic_munmap(devc); - beaglelogic_close(devc); - } - sdi->status = SR_ST_INACTIVE; + /* Close the memory mapping and the file */ + beaglelogic_munmap(devc); + beaglelogic_close(devc); + return SR_OK; } @@ -347,6 +343,7 @@ static struct sr_dev_driver beaglelogic_driver_info = { .cleanup = std_cleanup, .scan = scan, .dev_list = std_dev_list, + .dev_clear = std_dev_clear, .config_get = config_get, .config_set = config_set, .config_list = config_list,