]> sigrok.org Git - libsigrok.git/blobdiff - src/std.c
Add analog helper sr_analog_unit_to_string().
[libsigrok.git] / src / std.c
index 910e884704ce64a169a3a4b60fb7aac7542bebe3..fed47febe3598e15468b0e2433b6decbd362fb48 100644 (file)
--- a/src/std.c
+++ b/src/std.c
@@ -115,7 +115,7 @@ SR_PRIV int std_session_send_df_header(const struct sr_dev_inst *sdi,
  *
  * 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.
@@ -128,7 +128,7 @@ SR_PRIV int std_serial_dev_open(struct sr_dev_inst *sdi)
        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;
@@ -249,8 +249,7 @@ SR_PRIV int std_dev_clear(const struct sr_dev_driver *driver,
 {
        struct drv_context *drvc;
        struct sr_dev_inst *sdi;
-       struct sr_channel_group *cg;
-       GSList *l, *lcg;
+       GSList *l;
        int ret;
 
        if (!(drvc = driver->priv))
@@ -285,13 +284,6 @@ SR_PRIV int std_dev_clear(const struct sr_dev_driver *driver,
                else
                        g_free(sdi->priv);
 
-               /* Channel groups */
-               for (lcg = sdi->channel_groups; lcg; lcg = lcg->next) {
-                       cg = lcg->data;
-                       g_free(cg->name);
-                       g_slist_free(cg->channels);
-                       g_free(cg);
-               }
                sr_dev_inst_free(sdi);
        }