]> sigrok.org Git - libsigrok.git/blobdiff - hardware/norma-dmm/api.c
ols: Get fd from sp_get_port_handle() rather than serial struct.
[libsigrok.git] / hardware / norma-dmm / api.c
index ed8378ca231b46faa2f982a3d6e61a9ee27fdef2..d0089c62949e5245f0965ecc8bd7b440c3a71b51 100644 (file)
@@ -183,14 +183,9 @@ static int dev_open(struct sr_dev_inst *sdi)
 
 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);
 
        /* Free dynamically allocated resources. */
        if ((devc = sdi->priv) && devc->version) {