-static int hw_dev_open(struct sr_dev_inst *sdi)
-{
- struct dev_context *devc;
-
- if (!(devc = sdi->priv)) {
- sr_err("sdi->priv was NULL.");
- return SR_ERR_BUG;
- }
-
- if (serial_open(devc->serial, SERIAL_RDWR | SERIAL_NONBLOCK) != SR_OK)
- return SR_ERR;
-
- sdi->status = SR_ST_ACTIVE;
-
- return SR_OK;
-}
-
-static int hw_dev_close(struct sr_dev_inst *sdi)
-{
- struct dev_context *devc;
-
- devc = sdi->priv;
-
- if (devc->serial && devc->serial->fd != -1) {
- serial_close(devc->serial);
- sdi->status = SR_ST_INACTIVE;
- }
-
- return SR_OK;
-}
-
-static int hw_cleanup(void)