- if (!(devc = sdi->priv)) {
- sr_err("sdi->priv was NULL.");
- return SR_ERR_BUG;
- }
-
- if (devc->serial && devc->serial->fd != -1) {
- serial_close(devc->serial->fd);
- devc->serial->fd = -1;
- sdi->status = SR_ST_INACTIVE;
- }
-
- return SR_OK;
-}
-
-static int hw_cleanup(void)
-{
-
- clear_instances();
-
- return SR_OK;
-}
-
-static int hw_info_get(int info_id, const void **data,
- const struct sr_dev_inst *sdi)
-{
-
- (void)sdi;
-
- switch (info_id) {
- case SR_DI_HWOPTS:
- *data = hwopts;
- break;
- case SR_DI_HWCAPS:
- *data = hwcaps;
- break;
- case SR_DI_NUM_PROBES:
- *data = GINT_TO_POINTER(1);
- break;
- case SR_DI_PROBE_NAMES:
- *data = probe_names;
- break;
- default:
- return SR_ERR_ARG;
- }
-
- return SR_OK;
-}
-
-static int hw_dev_config_set(const struct sr_dev_inst *sdi, int hwcap,
- const void *value)
-{
- struct dev_context *devc;