]> sigrok.org Git - libsigrok.git/commitdiff
Remove now-unused fd field from struct sr_serial_dev_inst.
authorMartin Ling <redacted>
Sat, 7 Dec 2013 19:35:50 +0000 (19:35 +0000)
committerMartin Ling <redacted>
Sat, 7 Dec 2013 19:43:47 +0000 (19:43 +0000)
device.c
hardware/common/serial.c
libsigrok-internal.h

index 0167a220cc390b289bbfd121e650c5a32f4cb74a..987f45628ac9e08eac57b6ef5ecfbc7cbf5a4bff 100644 (file)
--- 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;
 }
index 0da8ec7b655ae51c8744417fc5ad859a13bc93b9..554dbb9be27b4ae0d64e3929a00f2598ec0e9fc0 100644 (file)
@@ -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;
 }
 
index 28ee268589d0596297ebd2f3fa80bebadc383973..5e0556e3c78e37238dd0eb8846d704ebc3784291 100644 (file)
@@ -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;
 };