]> sigrok.org Git - libsigrok.git/blobdiff - hardware/fx2lafw/api.c
Consistently use 'cg' for channel group variables.
[libsigrok.git] / hardware / fx2lafw / api.c
index 0c591428cbb0963b93056af0da8474302e7d45e2..777bd1488f3782ae8fa8678fac230a4ae5d4ad6f 100644 (file)
@@ -115,11 +115,6 @@ static const uint64_t samplerates[] = {
 SR_PRIV struct sr_dev_driver fx2lafw_driver_info;
 static struct sr_dev_driver *di = &fx2lafw_driver_info;
 
-static int dev_clear(void)
-{
-       return std_dev_clear(di, NULL);
-}
-
 static int init(struct sr_context *sr_ctx)
 {
        return std_init(sr_ctx, di, LOG_PREFIX);
@@ -230,7 +225,7 @@ static GSList *scan(GSList *options)
                                sr_err("Firmware upload failed for "
                                       "device %d.", devcnt);
                        sdi->inst_type = SR_INST_USB;
-                       sdi->conn = sr_usb_dev_inst_new (libusb_get_bus_number(devlist[i]),
+                       sdi->conn = sr_usb_dev_inst_new(libusb_get_bus_number(devlist[i]),
                                        0xff, NULL);
                }
        }
@@ -291,7 +286,7 @@ static int dev_open(struct sr_dev_inst *sdi)
 
        ret = libusb_claim_interface(usb->devhdl, USB_INTERFACE);
        if (ret != 0) {
-               switch(ret) {
+               switch (ret) {
                case LIBUSB_ERROR_BUSY:
                        sr_err("Unable to claim USB interface. Another "
                               "program or driver has already claimed it.");
@@ -342,7 +337,8 @@ static int cleanup(void)
        if (!(drvc = di->priv))
                return SR_OK;
 
-       ret = dev_clear();
+
+       ret = std_dev_clear(di, NULL);
 
        g_free(drvc);
        di->priv = NULL;
@@ -351,13 +347,13 @@ static int cleanup(void)
 }
 
 static int config_get(int id, GVariant **data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *cg)
 {
        struct dev_context *devc;
        struct sr_usb_dev_inst *usb;
        char str[128];
 
-       (void)probe_group;
+       (void)cg;
 
        switch (id) {
        case SR_CONF_CONN:
@@ -385,12 +381,12 @@ static int config_get(int id, GVariant **data, const struct sr_dev_inst *sdi,
 }
 
 static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *cg)
 {
        struct dev_context *devc;
        int ret;
 
-       (void)probe_group;
+       (void)cg;
 
        if (sdi->status != SR_ST_ACTIVE)
                return SR_ERR;
@@ -411,13 +407,13 @@ static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi,
 }
 
 static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *cg)
 {
        GVariant *gvar;
        GVariantBuilder gvb;
 
        (void)sdi;
-       (void)probe_group;
+       (void)cg;
 
        switch (key) {
        case SR_CONF_SCAN_OPTIONS:
@@ -556,7 +552,7 @@ SR_PRIV struct sr_dev_driver fx2lafw_driver_info = {
        .cleanup = cleanup,
        .scan = scan,
        .dev_list = dev_list,
-       .dev_clear = dev_clear,
+       .dev_clear = NULL,
        .config_get = config_get,
        .config_set = config_set,
        .config_list = config_list,