From: Martin Ling Date: Sat, 7 Dec 2013 19:35:50 +0000 (+0000) Subject: Remove now-unused fd field from struct sr_serial_dev_inst. X-Git-Tag: libsigrok-0.3.0~453 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=b6eb8252e545f358d359d4aa7a01073f10f1cd00;p=libsigrok.git Remove now-unused fd field from struct sr_serial_dev_inst. --- diff --git a/device.c b/device.c index 0167a220..987f4562 100644 --- a/device.c +++ b/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; } diff --git a/hardware/common/serial.c b/hardware/common/serial.c index 0da8ec7b..554dbb9b 100644 --- a/hardware/common/serial.c +++ b/hardware/common/serial.c @@ -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; } diff --git a/libsigrok-internal.h b/libsigrok-internal.h index 28ee2685..5e0556e3 100644 --- a/libsigrok-internal.h +++ b/libsigrok-internal.h @@ -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; };