*
* This function can be used to implement the dev_open() driver API
* callback in drivers that use a serial port. The port is opened
- * with the SERIAL_RDWR and SERIAL_NONBLOCK flags.
+ * with the SERIAL_RDWR flag.
*
* If the open succeeded, the status field of the given sdi is set
* to SR_ST_ACTIVE.
struct sr_serial_dev_inst *serial;
serial = sdi->conn;
- if (serial_open(serial, SERIAL_RDWR | SERIAL_NONBLOCK) != SR_OK)
+ if (serial_open(serial, SERIAL_RDWR) != SR_OK)
return SR_ERR;
sdi->status = SR_ST_ACTIVE;
sr_scpi_free(sdi->conn);
}
if (clear_private)
+ /* The helper function is responsible for freeing
+ * its own sdi->priv! */
clear_private(sdi->priv);
else
g_free(sdi->priv);
+
sr_dev_inst_free(sdi);
}