sr_err("No dev_clear in driver %d ('%s').", i, d);
errors++;
}
+ /* Note: config_get() is optional. */
+ if (!drivers[i]->config_set) {
+ sr_err("No config_set in driver %d ('%s').", i, d);
+ errors++;
+ }
+ if (!drivers[i]->config_list) {
+ sr_err("No config_list in driver %d ('%s').", i, d);
+ errors++;
+ }
if (!drivers[i]->dev_open) {
sr_err("No dev_open in driver %d ('%s').", i, d);
errors++;
.scan = hw_scan,
.dev_list = hw_dev_list,
.dev_clear = clear_instances,
+ .config_get = NULL,
.config_set = config_set,
.config_list = config_list,
.dev_open = hw_dev_open,
return SR_OK;
}
-static int hw_dev_config_set(int id, const void *value,
- const struct sr_dev_inst *sdi)
+static int config_set(int id, const void *value, const struct sr_dev_inst *sdi)
{
struct dev_context *devc;
int ret;
.scan = hw_scan,
.dev_list = hw_dev_list,
.dev_clear = clear_instances,
+ .config_get = NULL,
+ .config_set = config_set,
+ .config_list = config_list,
.dev_open = hw_dev_open,
.dev_close = hw_dev_close,
- .config_list = config_list,
- .config_set = hw_dev_config_set,
.dev_acquisition_start = hw_dev_acquisition_start,
.dev_acquisition_stop = hw_dev_acquisition_stop,
.priv = NULL,
.scan = hw_scan,
.dev_list = hw_dev_list,
.dev_clear = clear_instances,
+ .config_get = NULL,
.config_set = config_set,
.config_list = config_list,
.dev_open = hw_dev_open,
.scan = hw_scan,
.dev_list = hw_dev_list,
.dev_clear = clear_instances,
+ .config_get = NULL,
.config_set = config_set,
.config_list = config_list,
.dev_open = hw_dev_open,
.scan = hw_scan,
.dev_list = hw_dev_list,
.dev_clear = clear_instances,
+ .config_get = NULL,
.config_set = config_set,
.config_list = config_list,
.dev_open = hw_dev_open,
.scan = hw_scan,
.dev_list = hw_dev_list,
.dev_clear = clear_instances,
+ .config_get = NULL,
.config_set = config_set,
.config_list = config_list,
.dev_open = hw_dev_open,
.scan = hw_scan,
.dev_list = hw_dev_list,
.dev_clear = clear_instances,
+ .config_get = NULL,
.config_set = config_set,
.config_list = config_list,
.dev_open = hw_dev_open,
.scan = hw_scan,
.dev_list = hw_dev_list,
.dev_clear = clear_instances,
+ .config_get = NULL,
.config_set = config_set,
.config_list = config_list,
.dev_open = hw_dev_open,
.scan = hw_scan_##ID_UPPER, \
.dev_list = hw_dev_list_##ID_UPPER, \
.dev_clear = clear_instances_##ID_UPPER, \
+ .config_get = NULL, \
.config_set = config_set, \
.config_list = config_list, \
.dev_open = hw_dev_open, \
.scan = hw_scan,
.dev_list = hw_dev_list,
.dev_clear = clear_instances,
+ .config_get = NULL,
.config_set = config_set,
.config_list = config_list,
.dev_open = hw_dev_open,
.scan = hw_scan,
.dev_list = hw_dev_list,
.dev_clear = clear_instances,
+ .config_get = NULL,
.config_set = config_set,
.config_list = config_list,
.dev_open = hw_dev_open,
.scan = hw_scan,
.dev_list = hw_dev_list,
.dev_clear = clear_instances,
+ .config_get = NULL,
.config_set = config_set,
.config_list = config_list,
.dev_open = hw_dev_open,
.scan = hw_scan,
.dev_list = hw_dev_list,
.dev_clear = clear_instances,
+ .config_get = NULL,
.config_set = config_set,
.config_list = config_list,
.dev_open = hw_dev_open,
if (!driver || !data)
return SR_ERR;
- if (!driver->config_get)
- return SR_ERR_ARG;
-
ret = driver->config_get(key, data, sdi);
return ret;
if (!driver || !data)
return SR_ERR;
- if (!driver->config_list)
- return SR_ERR_ARG;
-
ret = driver->config_list(key, data, sdi);
return ret;