Remove now-unused fd field from struct sr_serial_dev_inst.
This commit is contained in:
parent
bf72f64999
commit
b6eb8252e5
1
device.c
1
device.c
|
@ -338,7 +338,6 @@ SR_PRIV struct sr_serial_dev_inst *sr_serial_dev_inst_new(const char *port,
|
|||
serial->port = g_strdup(port);
|
||||
if (serialcomm)
|
||||
serial->serialcomm = g_strdup(serialcomm);
|
||||
serial->fd = -1;
|
||||
|
||||
return serial;
|
||||
}
|
||||
|
|
|
@ -82,10 +82,6 @@ SR_PRIV int serial_open(struct sr_serial_dev_inst *serial, int flags)
|
|||
return SR_ERR;
|
||||
}
|
||||
|
||||
#ifndef _WIN32
|
||||
sp_get_port_handle(serial->data, &serial->fd);
|
||||
#endif
|
||||
|
||||
if (serial->serialcomm)
|
||||
return serial_set_paramstr(serial, serial->serialcomm);
|
||||
else
|
||||
|
@ -132,8 +128,6 @@ SR_PRIV int serial_close(struct sr_serial_dev_inst *serial)
|
|||
sp_free_port(serial->data);
|
||||
serial->data = NULL;
|
||||
|
||||
serial->fd = -1;
|
||||
|
||||
return SR_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -74,7 +74,6 @@ struct sr_usb_dev_inst {
|
|||
struct sr_serial_dev_inst {
|
||||
char *port;
|
||||
char *serialcomm;
|
||||
int fd;
|
||||
int nonblocking;
|
||||
struct sp_port *data;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue