-static int dev_open(struct sr_dev_inst *sdi)
-{
- struct sr_serial_dev_inst *serial = sdi->conn;
-
- if (serial_open(serial, SERIAL_RDONLY | SERIAL_NONBLOCK) != SR_OK)
- return SR_ERR;
-
- sdi->status = SR_ST_ACTIVE;
-
- return SR_OK;
-}
-
-static int dev_close(struct sr_dev_inst *sdi)
-{
- struct sr_serial_dev_inst *serial = sdi->conn;
-
- if (serial && serial->fd != -1) {
- serial_close(serial);
- sdi->status = SR_ST_INACTIVE;
- }
-
- return SR_OK;
-}
-