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);
|
serial->port = g_strdup(port);
|
||||||
if (serialcomm)
|
if (serialcomm)
|
||||||
serial->serialcomm = g_strdup(serialcomm);
|
serial->serialcomm = g_strdup(serialcomm);
|
||||||
serial->fd = -1;
|
|
||||||
|
|
||||||
return serial;
|
return serial;
|
||||||
}
|
}
|
||||||
|
|
|
@ -82,10 +82,6 @@ SR_PRIV int serial_open(struct sr_serial_dev_inst *serial, int flags)
|
||||||
return SR_ERR;
|
return SR_ERR;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef _WIN32
|
|
||||||
sp_get_port_handle(serial->data, &serial->fd);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (serial->serialcomm)
|
if (serial->serialcomm)
|
||||||
return serial_set_paramstr(serial, serial->serialcomm);
|
return serial_set_paramstr(serial, serial->serialcomm);
|
||||||
else
|
else
|
||||||
|
@ -132,8 +128,6 @@ SR_PRIV int serial_close(struct sr_serial_dev_inst *serial)
|
||||||
sp_free_port(serial->data);
|
sp_free_port(serial->data);
|
||||||
serial->data = NULL;
|
serial->data = NULL;
|
||||||
|
|
||||||
serial->fd = -1;
|
|
||||||
|
|
||||||
return SR_OK;
|
return SR_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -74,7 +74,6 @@ struct sr_usb_dev_inst {
|
||||||
struct sr_serial_dev_inst {
|
struct sr_serial_dev_inst {
|
||||||
char *port;
|
char *port;
|
||||||
char *serialcomm;
|
char *serialcomm;
|
||||||
int fd;
|
|
||||||
int nonblocking;
|
int nonblocking;
|
||||||
struct sp_port *data;
|
struct sp_port *data;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue