]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/gmc-mh-1x-2x/api.c
Various log message cleanups.
[libsigrok.git] / src / hardware / gmc-mh-1x-2x / api.c
index 801429ce65c942dc8ba1bbb15f3bf12ab60d836c..332c90172db349ad1a6e3ebd8778e35063f1a86f 100644 (file)
@@ -159,8 +159,6 @@ static GSList *scan_1x_2x_rs232(struct sr_dev_driver *di, GSList *options)
        conn = serialcomm = NULL;
        serialcomm_given = FALSE;
 
-       sr_spew("scan_1x_2x_rs232() called!");
-
        for (l = options; l; l = l->next) {
                src = l->data;
                switch (src->key) {
@@ -242,8 +240,6 @@ static GSList *scan_2x_bd232(struct sr_dev_driver *di, GSList *options)
        conn = serialcomm = NULL;
        devices = NULL;
 
-       sr_spew("scan_2x_bd232() called!");
-
        for (l = options; l; l = l->next) {
                src = l->data;
                switch (src->key) {
@@ -321,8 +317,6 @@ static GSList *scan_2x_bd232(struct sr_dev_driver *di, GSList *options)
        return std_scan_complete(di, devices);
 
 exit_err:
-       sr_info("scan_2x_bd232(): Error!");
-
        sr_serial_dev_inst_free(serial);
        g_free(devc);
        sr_dev_inst_free(sdi);
@@ -334,13 +328,11 @@ static int dev_close(struct sr_dev_inst *sdi)
 {
        struct dev_context *devc;
 
-       std_serial_dev_close(sdi);
+       devc = sdi->priv;
 
-       sdi->status = SR_ST_INACTIVE;
-       if ((devc = sdi->priv))
-               devc->model = METRAHIT_NONE;
+       devc->model = METRAHIT_NONE;
 
-       return SR_OK;
+       return std_serial_dev_close(sdi);
 }
 
 static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
@@ -427,9 +419,6 @@ static int dev_acquisition_start_1x_2x_rs232(const struct sr_dev_inst *sdi)
        struct dev_context *devc;
        struct sr_serial_dev_inst *serial;
 
-       if (sdi->status != SR_ST_ACTIVE)
-               return SR_ERR_DEV_CLOSED;
-
        devc = sdi->priv;
        devc->settings_ok = FALSE;
        devc->buflen = 0;
@@ -450,9 +439,6 @@ static int dev_acquisition_start_2x_bd232(const struct sr_dev_inst *sdi)
        struct dev_context *devc;
        struct sr_serial_dev_inst *serial;
 
-       if (sdi->status != SR_ST_ACTIVE)
-               return SR_ERR_DEV_CLOSED;
-
        devc = sdi->priv;
        devc->settings_ok = FALSE;
        devc->buflen = 0;