return SR_ERR;
}
- /* We're good to go now */
- sdi->status = SR_ST_ACTIVE;
return SR_OK;
}
{
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;
}
(void)cg;
- if (sdi->status != SR_ST_ACTIVE)
- return SR_ERR_DEV_CLOSED;
-
switch (key) {
case SR_CONF_SAMPLERATE:
devc->cur_samplerate = g_variant_get_uint64(data);