]> sigrok.org Git - libsigrok.git/blobdiff - hardware/gmc-mh-1x-2x/api.c
Various drivers: Drop some unneeded lines.
[libsigrok.git] / hardware / gmc-mh-1x-2x / api.c
index ce849765a0fd1b61f89177d794f34c20c3feea05..09ed9c151bc79a86f278e2195b5dfc92d581c942 100644 (file)
@@ -162,7 +162,7 @@ static GSList *scan_1x_2x_rs232(GSList *options)
        struct drv_context *drvc;
        struct dev_context *devc;
        struct sr_config *src;
-       struct sr_channel *probe;
+       struct sr_channel *ch;
        struct sr_serial_dev_inst *serial;
        GSList *l, *devices;
        const char *conn, *serialcomm;
@@ -240,9 +240,9 @@ static GSList *scan_1x_2x_rs232(GSList *options)
                sdi->conn = serial;
                sdi->priv = devc;
                sdi->driver = &gmc_mh_1x_2x_rs232_driver_info;
-               if (!(probe = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "P1")))
+               if (!(ch = sr_channel_new(0, SR_CHANNEL_ANALOG, TRUE, "P1")))
                        return NULL;
-               sdi->probes = g_slist_append(sdi->probes, probe);
+               sdi->channels = g_slist_append(sdi->channels, ch);
                drvc->instances = g_slist_append(drvc->instances, sdi);
                devices = g_slist_append(devices, sdi);
        }
@@ -259,7 +259,7 @@ static GSList *scan_2x_bd232(GSList *options)
        struct drv_context *drvc;
        struct dev_context *devc;
        struct sr_config *src;
-       struct sr_channel *probe;
+       struct sr_channel *ch;
        struct sr_serial_dev_inst *serial;
        GSList *l, *devices;
        const char *conn, *serialcomm;
@@ -343,9 +343,9 @@ static GSList *scan_2x_bd232(GSList *options)
                        sdi->conn = serial;
                        sdi->priv = devc;
                        sdi->driver = &gmc_mh_2x_bd232_driver_info;
-                       if (!(probe = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "P1")))
+                       if (!(ch = sr_channel_new(0, SR_CHANNEL_ANALOG, TRUE, "P1")))
                                goto exit_err;
-                       sdi->probes = g_slist_append(sdi->probes, probe);
+                       sdi->channels = g_slist_append(sdi->channels, ch);
                        drvc->instances = g_slist_append(drvc->instances, sdi);
                        devices = g_slist_append(devices, sdi);
 
@@ -428,14 +428,10 @@ static int config_get(int key, GVariant **data, const struct sr_dev_inst *sdi,
        int ret;
        struct dev_context *devc;
 
-       (void)sdi;
-       (void)data;
        (void)cg;
 
        ret = SR_OK;
 
-       (void)cg;
-
        if (!sdi || !(devc = sdi->priv))
                return SR_ERR_ARG;
 
@@ -447,7 +443,6 @@ static int config_get(int key, GVariant **data, const struct sr_dev_inst *sdi,
        case SR_CONF_LIMIT_MSEC:
                *data = g_variant_new_uint64(devc->limit_msec);
                break;
-
        case SR_CONF_POWER_OFF:
                *data = g_variant_new_boolean(FALSE);
                break;
@@ -481,8 +476,6 @@ static int config_list_common(int key, GVariant **data, const struct sr_dev_inst
 static int config_list_sm(int key, GVariant **data, const struct sr_dev_inst *sdi,
                          const struct sr_channel_group *cg)
 {
-       (void)sdi;
-
        switch (key) {
        case SR_CONF_DEVICE_OPTIONS:
                *data = g_variant_new_fixed_array(G_VARIANT_TYPE_INT32,
@@ -499,8 +492,6 @@ static int config_list_sm(int key, GVariant **data, const struct sr_dev_inst *sd
 static int config_list_bd(int key, GVariant **data, const struct sr_dev_inst *sdi,
                          const struct sr_channel_group *cg)
 {
-       (void)sdi;
-
        switch (key) {
        case SR_CONF_DEVICE_OPTIONS:
                *data = g_variant_new_fixed_array(G_VARIANT_TYPE_INT32,