static int dev_close(struct sr_dev_inst *sdi)
{
- struct sr_serial_dev_inst *serial;
struct dev_context *devc;
- serial = sdi->conn;
- if (serial && serial->fd != -1) {
- serial_close(serial);
- sdi->status = SR_ST_INACTIVE;
- }
+ std_serial_dev_close(sdi);
sdi->status = SR_ST_INACTIVE;