]> sigrok.org Git - libsigrok.git/blobdiff - src/hwdriver.c
Change sr_dev_inst_new() to take no parameters.
[libsigrok.git] / src / hwdriver.c
index dd22a6159cc40991591a2b029ecaa9251eab3312..c7dc616ca9f959e2f21ce6a27771c19c2f749a0f 100644 (file)
@@ -102,8 +102,8 @@ static struct sr_config_info sr_config_info_data[] = {
                "Buffer size", NULL},
        {SR_CONF_TIMEBASE, SR_T_RATIONAL_PERIOD, "timebase",
                "Time base", NULL},
-       {SR_CONF_FILTER, SR_T_STRING, "filter",
-               "Filter targets", NULL},
+       {SR_CONF_FILTER, SR_T_BOOL, "filter",
+               "Filter", NULL},
        {SR_CONF_VDIV, SR_T_RATIONAL_VOLT, "vdiv",
                "Volts/div", NULL},
        {SR_CONF_COUPLING, SR_T_STRING, "coupling",
@@ -562,6 +562,8 @@ SR_API const struct sr_config_info *sr_config_info_name_get(const char *optname)
        int i;
 
        for (i = 0; sr_config_info_data[i].key; i++) {
+               if (!sr_config_info_data[i].id)
+                       continue;
                if (!strcmp(sr_config_info_data[i].id, optname))
                        return &sr_config_info_data[i];
        }