]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/beaglelogic/api.c
sr_dev_close(): Set status to SR_ST_INACTIVE.
[libsigrok.git] / src / hardware / beaglelogic / api.c
index 09fcf0bdb5577459d49b2f7602b8ba03aaa0ff51..ff8f0424d32049c834a365fe8eefa03c0e4dfe48 100644 (file)
@@ -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;
 }