- if (sdi->status == SR_ST_ACTIVE) {
- /* Close the memory mapping and the file */
- beaglelogic_munmap(devc);
- beaglelogic_close(devc);
- }
- sdi->status = SR_ST_INACTIVE;
- return SR_OK;
-}
-
-static int cleanup(const struct sr_dev_driver *di)
-{
- struct drv_context *drvc;
- struct sr_dev_inst *sdi;
- GSList *l;
-
- /* unused driver */
- if (!(drvc = di->context))
- return SR_OK;
+ /* Close the memory mapping and the file */
+ beaglelogic_munmap(devc);
+ beaglelogic_close(devc);