X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=hardware%2Fagilent-dmm%2Fapi.c;h=e67f0e020a78db3ab3b2329eeeeae8481d549fb3;hb=be60a9e4a97ab68a140511afca83db1f202e7a0e;hp=41e3075db12ad5542680398092a5b019da3a74b1;hpb=f6beaac55ca58c406d6621038abe57c16a47e87f;p=libsigrok.git diff --git a/hardware/agilent-dmm/api.c b/hardware/agilent-dmm/api.c index 41e3075d..e67f0e02 100644 --- a/hardware/agilent-dmm/api.c +++ b/hardware/agilent-dmm/api.c @@ -61,7 +61,7 @@ static const struct agdmm_profile supported_agdmm[] = { SR_PRIV struct sr_dev_driver agdmm_driver_info; static struct sr_dev_driver *di = &agdmm_driver_info; -static int clear_instances(void) +static int dev_clear(void) { return std_dev_clear(di, NULL); } @@ -129,7 +129,7 @@ static GSList *scan(GSList *options) tokens = g_strsplit(buf, ",", 4); if (!strcmp("Agilent Technologies", tokens[0]) - && tokens[2] && tokens[3]) { + && tokens[1] && tokens[2] && tokens[3]) { for (i = 0; supported_agdmm[i].model; i++) { if (strcmp(supported_agdmm[i].modelname, tokens[1])) continue; @@ -197,13 +197,16 @@ static int dev_close(struct sr_dev_inst *sdi) static int cleanup(void) { - return clear_instances(); + return dev_clear(); } -static int config_set(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) { struct dev_context *devc; + (void)probe_group; + if (sdi->status != SR_ST_ACTIVE) return SR_ERR_DEV_CLOSED; @@ -235,10 +238,11 @@ static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi) return SR_OK; } -static int config_list(int key, 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) { - (void)sdi; + (void)probe_group; switch (key) { case SR_CONF_SCAN_OPTIONS: @@ -295,7 +299,7 @@ SR_PRIV struct sr_dev_driver agdmm_driver_info = { .cleanup = cleanup, .scan = scan, .dev_list = dev_list, - .dev_clear = clear_instances, + .dev_clear = dev_clear, .config_get = NULL, .config_set = config_set, .config_list = config_list,