drivers: Consistently use same indentation for config_*() API calls.

This commit is contained in:
Uwe Hermann 2017-07-21 20:59:50 +02:00
parent 58ffcf9712
commit dd7a72ea69
50 changed files with 267 additions and 273 deletions

View File

@ -183,8 +183,8 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
return std_scan_complete(di, devices);
}
static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_get(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc;
int ret;
@ -212,8 +212,8 @@ static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *s
return ret;
}
static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_set(uint32_t key, GVariant *data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc;
uint64_t samplerate;
@ -256,8 +256,8 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd
return ret;
}
static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_list(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
switch (key) {
case SR_CONF_SCAN_OPTIONS:

View File

@ -109,8 +109,8 @@ scan_cleanup:
return std_scan_complete(di, devices);
}
static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_get(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc = sdi->priv;
@ -130,8 +130,8 @@ static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *s
return SR_OK;
}
static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_set(uint32_t key, GVariant *data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc;
const char *tmp_str;
@ -163,8 +163,8 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd
return SR_OK;
}
static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_list(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
switch (key) {
case SR_CONF_SCAN_OPTIONS:

View File

@ -156,8 +156,8 @@ static int dev_close(struct sr_dev_inst *sdi)
return (ftdi_usb_close(&devc->ftdic) == 0) ? SR_OK : SR_ERR;
}
static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_get(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc;
@ -189,8 +189,8 @@ static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *s
return SR_OK;
}
static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_set(uint32_t key, GVariant *data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc;
uint64_t tmp;
@ -232,8 +232,8 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd
return ret;
}
static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_list(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
switch (key) {
case SR_CONF_DEVICE_OPTIONS:

View File

@ -182,8 +182,8 @@ static GSList *scan_3203(struct sr_dev_driver *di, GSList *options)
return scan(di, options, PPS_3203T_3S);
}
static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_get(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc;
struct sr_channel *ch;
@ -249,8 +249,8 @@ static int find_str(const char *str, const char **strings, int array_size)
return idx;
}
static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_set(uint32_t key, GVariant *data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc;
struct sr_channel *ch;
@ -326,8 +326,8 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd
return ret;
}
static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_list(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc;
struct sr_channel *ch;

View File

@ -132,8 +132,7 @@ err_out:
}
static int config_get(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc;
int ret;
@ -173,8 +172,7 @@ static int config_get(uint32_t key, GVariant **data,
}
static int config_set(uint32_t key, GVariant *data,
const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc;
uint64_t samplerate;
@ -216,8 +214,7 @@ static int config_set(uint32_t key, GVariant *data,
}
static int config_list(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
uint32_t devopts_cg[MAX_DEVOPTS_CG];
int num_devopts_cg = 0;

View File

@ -169,8 +169,8 @@ static int dev_close(struct sr_dev_inst *sdi)
return SR_OK;
}
static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_get(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc = sdi->priv;
@ -196,8 +196,8 @@ static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *s
return SR_OK;
}
static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_set(uint32_t key, GVariant *data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc = sdi->priv;
uint64_t tmp_u64;
@ -237,8 +237,8 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd
return SR_OK;
}
static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_list(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
switch (key) {
case SR_CONF_SCAN_OPTIONS:

View File

@ -145,8 +145,8 @@ static int dev_close(struct sr_dev_inst *sdi)
return (ret == 0) ? SR_OK : SR_ERR;
}
static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_get(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc = sdi->priv;
@ -155,8 +155,8 @@ static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *s
return sr_sw_limits_config_get(&devc->sw_limits, key, data);
}
static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_set(uint32_t key, GVariant *data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc;
@ -167,8 +167,8 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd
return sr_sw_limits_config_set(&devc->sw_limits, key, data);
}
static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_list(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
return STD_CONFIG_LIST(key, data, sdi, cg, scanopts, drvopts, devopts);
}

View File

@ -118,8 +118,8 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
return devices;
}
static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_set(uint32_t key, GVariant *data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc;
@ -130,8 +130,8 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd
return sr_sw_limits_config_set(&devc->sw_limits, key, data);
}
static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_list(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
return STD_CONFIG_LIST(key, data, sdi, cg, scanopts, drvopts, devopts);
}

View File

@ -125,8 +125,8 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
return std_scan_complete(di, devices);
}
static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_get(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc;
GVariant *range[2];
@ -197,8 +197,8 @@ static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *s
return ret;
}
static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_set(uint32_t key, GVariant *data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc;
uint64_t tmp_u64, low, high;
@ -281,8 +281,8 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd
return ret;
}
static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_list(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
switch (key) {
case SR_CONF_SCAN_OPTIONS:

View File

@ -117,8 +117,8 @@ static GSList *scan(GSList *options, int idx)
return std_scan_complete(center_devs[idx].di, devices);
}
static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_set(uint32_t key, GVariant *data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc;
@ -129,8 +129,8 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd
return sr_sw_limits_config_set(&devc->sw_limits, key, data);
}
static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_list(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
return STD_CONFIG_LIST(key, data, sdi, cg, scanopts, drvopts, devopts);
}

View File

@ -283,8 +283,8 @@ static int dev_close(struct sr_dev_inst *sdi)
return (ret == 0) ? SR_OK : SR_ERR;
}
static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_get(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc;
struct sr_usb_dev_inst *usb;
@ -312,8 +312,8 @@ static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *s
return SR_OK;
}
static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_set(uint32_t key, GVariant *data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc;
@ -343,8 +343,8 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd
return SR_OK;
}
static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_list(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
GVariant *grange[2];
struct dev_context *devc;

View File

@ -84,8 +84,8 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
return std_scan_complete(di, g_slist_append(NULL, sdi));
}
static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_set(uint32_t key, GVariant *data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc;
@ -96,8 +96,8 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd
return sr_sw_limits_config_set(&devc->limits, key, data);
}
static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_list(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
return STD_CONFIG_LIST(key, data, sdi, cg, scanopts, drvopts, devopts);
}

View File

@ -90,8 +90,8 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
return std_scan_complete(di, g_slist_append(NULL, sdi));
}
static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_set(uint32_t key, GVariant *data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
int ret;
double dblval;
@ -128,8 +128,8 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd
return ret;
}
static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_list(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
return STD_CONFIG_LIST(key, data, sdi, cg, scanopts, drvopts, devopts);
}

View File

@ -197,8 +197,8 @@ static int dev_clear(const struct sr_dev_driver *di)
return std_dev_clear_with_callback(di, (std_dev_clear_callback)clear_helper);
}
static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_get(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc;
struct sr_channel *ch;
@ -257,8 +257,8 @@ static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *s
return SR_OK;
}
static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_set(uint32_t key, GVariant *data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc;
struct analog_gen *ag;
@ -351,8 +351,8 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd
return SR_OK;
}
static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_list(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct sr_channel *ch;

View File

@ -182,8 +182,8 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
return devices;
}
static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_set(uint32_t key, GVariant *data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc;
@ -194,8 +194,8 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd
return sr_sw_limits_config_set(&devc->limits, key, data);
}
static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_list(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
return STD_CONFIG_LIST(key, data, sdi, cg, scanopts, drvopts, devopts);
}

View File

@ -327,8 +327,8 @@ static int dev_close(struct sr_dev_inst *sdi)
return std_serial_dev_close(sdi);
}
static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_get(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc;
@ -354,15 +354,15 @@ static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *s
}
/** Implementation of config_list for Metrahit 1x/2x send mode */
static int config_list_sm(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_list_sm(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
return STD_CONFIG_LIST(key, data, sdi, cg, scanopts, drvopts, devopts_sm);
}
/** Implementation of config_list for Metrahit 2x bidirectional mode */
static int config_list_bd(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_list_bd(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
return STD_CONFIG_LIST(key, data, sdi, cg, scanopts, drvopts, devopts_bd);
}

View File

@ -116,8 +116,8 @@ static int dev_close(struct sr_dev_inst *sdi)
return sr_scpi_close(scpi);
}
static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_get(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc;
@ -139,8 +139,8 @@ static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *s
return SR_OK;
}
static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_set(uint32_t key, GVariant *data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc;
@ -162,8 +162,8 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd
return SR_OK;
}
static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_list(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
return STD_CONFIG_LIST(key, data, sdi, cg, scanopts, drvopts, devopts);
}

View File

@ -162,8 +162,8 @@ static int check_channel_group(struct dev_context *devc,
return CG_INVALID;
}
static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_get(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
int ret, cg_type;
unsigned int i;
@ -269,8 +269,8 @@ static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *s
return ret;
}
static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_set(uint32_t key, GVariant *data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
int ret, cg_type;
unsigned int i, j;
@ -443,8 +443,8 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd
return ret;
}
static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_list(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
int cg_type = CG_NONE;
struct dev_context *devc = NULL;

View File

@ -322,8 +322,8 @@ static int dev_close(struct sr_dev_inst *sdi)
return SR_OK;
}
static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_get(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc;
struct sr_usb_dev_inst *usb;
@ -388,8 +388,8 @@ static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *s
return SR_OK;
}
static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_set(uint32_t key, GVariant *data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc;
uint64_t p, q;
@ -455,8 +455,8 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd
return SR_OK;
}
static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_list(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc;

View File

@ -392,8 +392,8 @@ static int dev_close(struct sr_dev_inst *sdi)
return SR_OK;
}
static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_get(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc;
struct sr_usb_dev_inst *usb;
@ -472,8 +472,8 @@ static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *s
return SR_OK;
}
static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_set(uint32_t key, GVariant *data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc;
double tmp_double;
@ -586,8 +586,8 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd
return SR_OK;
}
static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_list(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc;

View File

@ -243,8 +243,7 @@ static int config_get(uint32_t key, GVariant **data,
}
static int config_set(uint32_t key, GVariant *data,
const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
int ret;
enum sr_mq mq;

View File

@ -336,8 +336,8 @@ static int reverse_map(uint8_t u, const uint8_t *arr, int n)
return i;
}
static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_get(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc = sdi->priv;
struct parport *port;
@ -409,8 +409,8 @@ static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *s
return SR_OK;
}
static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_set(uint32_t key, GVariant *data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc = sdi->priv;
int i, ch = -1;
@ -505,8 +505,7 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd
}
static int config_channel_set(const struct sr_dev_inst *sdi,
struct sr_channel *ch,
unsigned int changes)
struct sr_channel *ch, unsigned int changes)
{
struct dev_context *devc = sdi->priv;
uint8_t v;
@ -553,8 +552,8 @@ static int config_commit(const struct sr_dev_inst *sdi)
return hung_chang_dso_2100_move_to(sdi, state);
}
static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_list(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
GSList *l;

View File

@ -244,8 +244,8 @@ static int dev_close(struct sr_dev_inst *sdi)
return SR_OK;
}
static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_get(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc;
int ret;
@ -269,8 +269,8 @@ static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *s
return ret;
}
static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_set(uint32_t key, GVariant *data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
uint64_t samplerate, limit_samples, capture_ratio;
int ret;
@ -297,8 +297,8 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd
return ret;
}
static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_list(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
GVariant *grange[2];

View File

@ -200,8 +200,8 @@ static int dev_close(struct sr_dev_inst *sdi)
return scanaplus_close(devc);
}
static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_get(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
(void)sdi;
(void)cg;
@ -218,8 +218,8 @@ static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *s
return SR_OK;
}
static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_set(uint32_t key, GVariant *data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc;
@ -252,8 +252,8 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd
return SR_OK;
}
static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_list(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
switch (key) {
case SR_CONF_DEVICE_OPTIONS:

View File

@ -197,8 +197,8 @@ static int dev_close(struct sr_dev_inst *sdi)
return SR_OK;
}
static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_get(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc;
GVariant *rational[2];
@ -246,8 +246,8 @@ static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *s
return SR_OK;
}
static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_set(uint32_t key, GVariant *data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc;
uint64_t p, q;
@ -317,8 +317,8 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd
return SR_OK;
}
static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_list(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
switch (key) {
case SR_CONF_DEVICE_OPTIONS:

View File

@ -113,8 +113,8 @@ scan_cleanup:
return std_scan_complete(di, devices);
}
static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_set(uint32_t key, GVariant *data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc;
@ -125,8 +125,8 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd
return sr_sw_limits_config_set(&devc->limits, key, data);
}
static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_list(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
return STD_CONFIG_LIST(key, data, sdi, cg, scanopts, drvopts, devopts);
}

View File

@ -120,8 +120,8 @@ static int dev_close(struct sr_dev_inst *sdi)
return SR_OK;
}
static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_get(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc;
struct sr_usb_dev_inst *usb;
@ -156,8 +156,8 @@ static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *s
return SR_OK;
}
static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_set(uint32_t key, GVariant *data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc;
int ret;
@ -183,8 +183,8 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd
return ret;
}
static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_list(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
return STD_CONFIG_LIST(key, data, sdi, cg, scanopts, drvopts, devopts);
}

View File

@ -202,8 +202,8 @@ static int dev_open(struct sr_dev_inst *sdi)
return SR_OK;
}
static int config_get(int key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_get(int key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc;
@ -225,8 +225,8 @@ static int config_get(int key, GVariant **data, const struct sr_dev_inst *sdi,
return SR_OK;
}
static int config_set(int key, GVariant *data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_set(int key, GVariant *data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
int ret;
struct dev_context *devc;
@ -285,8 +285,8 @@ static int config_set(int key, GVariant *data, const struct sr_dev_inst *sdi,
return ret;
}
static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_list(int key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
switch (key) {
case SR_CONF_DEVICE_OPTIONS:

View File

@ -172,8 +172,8 @@ exit_err:
return NULL;
}
static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_get(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc;
@ -210,8 +210,8 @@ static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *s
return SR_OK;
}
static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_set(uint32_t key, GVariant *data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc;
gboolean bval;
@ -263,8 +263,8 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd
return SR_OK;
}
static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_list(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
const double *a;
struct dev_context *devc;

View File

@ -232,8 +232,8 @@ static int dev_close(struct sr_dev_inst *sdi)
return sr_modbus_close(modbus);
}
static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_get(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc;
struct sr_modbus_dev_inst *modbus;
@ -316,8 +316,8 @@ static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *s
return ret;
}
static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_set(uint32_t key, GVariant *data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc;
struct sr_modbus_dev_inst *modbus;
@ -356,8 +356,8 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd
return ret;
}
static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_list(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc;

View File

@ -124,8 +124,8 @@ static GSList *scan(GSList *options, int idx)
return devices;
}
static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_set(uint32_t key, GVariant *data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc;
@ -136,8 +136,8 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd
return sr_sw_limits_config_set(&devc->limits, key, data);
}
static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg, int idx)
static int config_list(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg, int idx)
{
/*
* We can't use the ternary operator here! The result would contain

View File

@ -489,8 +489,8 @@ static int dev_clear(const struct sr_dev_driver *di)
return std_dev_clear_with_callback(di, (std_dev_clear_callback)clear_helper);
}
static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_get(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc;
struct sr_channel *ch;
@ -541,8 +541,8 @@ static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *s
return SR_OK;
}
static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_set(uint32_t key, GVariant *data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc;
struct sr_channel *ch;
@ -645,8 +645,8 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd
return SR_OK;
}
static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_list(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc;
struct sr_channel *ch;

View File

@ -159,8 +159,8 @@ static GSList *scan(struct sr_dev_driver *drv, GSList *options)
return std_scan_complete(drv, devices);
}
static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_set(uint32_t key, GVariant *data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc;
@ -171,8 +171,8 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd
return sr_sw_limits_config_set(&devc->limits, key, data);
}
static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_list(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
return STD_CONFIG_LIST(key, data, sdi, cg, scanopts, drvopts, devopts);
}

View File

@ -187,8 +187,8 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
return std_scan_complete(di, g_slist_append(NULL, sdi));
}
static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_get(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc;
@ -226,8 +226,8 @@ static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *s
return SR_OK;
}
static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_set(uint32_t key, GVariant *data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc;
uint16_t flag;
@ -319,8 +319,8 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd
return ret;
}
static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_list(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc;
GVariant *grange[2];

View File

@ -195,8 +195,8 @@ static int dev_clear(const struct sr_dev_driver *di)
return std_dev_clear_with_callback(di, (std_dev_clear_callback)clear_helper);
}
static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_get(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc;
@ -237,8 +237,8 @@ static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *s
return SR_OK;
}
static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_set(uint32_t key, GVariant *data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc;
uint16_t flag;
@ -330,8 +330,8 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd
return ret;
}
static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_list(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc;
GVariant *grange[2];

View File

@ -469,8 +469,8 @@ static int digital_frame_size(const struct sr_dev_inst *sdi)
}
}
static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_get(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc;
struct sr_channel *ch;
@ -613,8 +613,8 @@ static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *s
return SR_OK;
}
static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_set(uint32_t key, GVariant *data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc;
uint64_t p, q;
@ -798,8 +798,8 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd
return ret;
}
static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_list(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
unsigned int i;
struct dev_context *devc;

View File

@ -300,7 +300,7 @@ static int dev_close(struct sr_dev_inst *sdi)
}
static int config_get(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct sr_usb_dev_inst *usb;
struct dev_context *devc;
@ -328,7 +328,7 @@ static int config_get(uint32_t key, GVariant **data,
}
static int config_set(uint32_t key, GVariant *data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc;
@ -348,7 +348,7 @@ static int config_set(uint32_t key, GVariant *data,
}
static int config_list(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
switch (key) {
case SR_CONF_SCAN_OPTIONS:

View File

@ -395,8 +395,8 @@ static int dev_close(struct sr_dev_inst *sdi)
return SR_OK;
}
static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_get(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc;
struct sr_usb_dev_inst *usb;
@ -455,8 +455,8 @@ static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *s
return ret;
}
static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_set(uint32_t key, GVariant *data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc;
gdouble low, high;
@ -499,8 +499,8 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd
return ret;
}
static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_list(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
GVariant *gvar, *range[2];
GVariantBuilder gvb;

View File

@ -299,8 +299,8 @@ static int dev_clear(const struct sr_dev_driver *di)
return std_dev_clear_with_callback(di, (std_dev_clear_callback)clear_helper);
}
static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_get(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc;
const GVariantType *gvtype;
@ -428,8 +428,8 @@ static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *s
return ret;
}
static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_set(uint32_t key, GVariant *data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc;
double d;
@ -508,8 +508,8 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd
return ret;
}
static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_list(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc;
struct sr_channel *ch;

View File

@ -140,8 +140,8 @@ scan_cleanup:
return std_scan_complete(di, devices);
}
static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_set(uint32_t key, GVariant *data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc;
@ -152,8 +152,8 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd
return sr_sw_limits_config_set(&devc->limits, key, data);
}
static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_list(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
return STD_CONFIG_LIST(key, data, sdi, cg, scanopts, drvopts, devopts);
}

View File

@ -323,8 +323,8 @@ static int has_devopt(const struct model_info *model, uint32_t key)
return FALSE;
}
static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_get(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc;
unsigned int idx;
@ -403,8 +403,8 @@ static int lookup_index(GVariant *value, const char *const *table, int len)
return -1;
}
static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_set(uint32_t key, GVariant *data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
uint64_t value;
struct dev_context *devc;
@ -474,7 +474,7 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd
}
static int config_channel_set(const struct sr_dev_inst *sdi,
struct sr_channel *ch, unsigned int changes)
struct sr_channel *ch, unsigned int changes)
{
uint64_t channel_bit;
struct dev_context *devc;
@ -593,8 +593,7 @@ static int config_commit(const struct sr_dev_inst *sdi)
}
static int config_list(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc;

View File

@ -124,8 +124,8 @@ scan_cleanup:
return std_scan_complete(di, devices);
}
static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_set(uint32_t key, GVariant *data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc;
@ -136,8 +136,8 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd
return sr_sw_limits_config_set(&devc->sw_limits, key, data);
}
static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_list(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
return STD_CONFIG_LIST(key, data, sdi, cg, scanopts, drvopts, devopts);
}

View File

@ -184,8 +184,8 @@ static int dev_close(struct sr_dev_inst *sdi)
return SR_OK;
}
static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_get(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc = sdi->priv;
struct sr_usb_dev_inst *usb;
@ -211,8 +211,8 @@ static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *s
return SR_OK;
}
static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_set(uint32_t key, GVariant *data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc = sdi->priv;
@ -221,8 +221,8 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd
return sr_sw_limits_config_set(&devc->sw_limits, key, data);
}
static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_list(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
return STD_CONFIG_LIST(key, data, sdi, cg, scanopts, drvopts, devopts);
}

View File

@ -94,8 +94,8 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
return std_scan_complete(di, g_slist_append(NULL, sdi));
}
static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_set(uint32_t key, GVariant *data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc;
@ -106,8 +106,8 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd
return sr_sw_limits_config_set(&devc->limits, key, data);
}
static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_list(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
return STD_CONFIG_LIST(key, data, sdi, cg, scanopts, drvopts, devopts);
}

View File

@ -109,8 +109,8 @@ static int dev_open(struct sr_dev_inst *sdi)
return sr_usb_open(drvc->sr_ctx->libusb_ctx, usb);
}
static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_set(uint32_t key, GVariant *data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc;
@ -121,8 +121,8 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd
return sr_sw_limits_config_set(&devc->limits, key, data);
}
static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_list(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
return STD_CONFIG_LIST(key, data, sdi, cg, scanopts, drvopts, devopts);
}

View File

@ -149,8 +149,8 @@ static int dev_close(struct sr_dev_inst *sdi)
return SR_OK;
}
static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_get(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc;
@ -174,8 +174,8 @@ static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *s
return SR_OK;
}
static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_set(uint32_t key, GVariant *data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc;
const char *tmp_str;
@ -204,8 +204,8 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd
return SR_OK;
}
static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_list(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
switch (key) {
case SR_CONF_SCAN_OPTIONS:

View File

@ -137,8 +137,8 @@ static int dev_close(struct sr_dev_inst *sdi)
return SR_OK;
}
static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_get(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc = sdi->priv;
struct sr_usb_dev_inst *usb;
@ -164,8 +164,8 @@ static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *s
return SR_OK;
}
static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_set(uint32_t key, GVariant *data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc;
@ -176,8 +176,8 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd
return sr_sw_limits_config_set(&devc->limits, key, data);
}
static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_list(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
return STD_CONFIG_LIST(key, data, sdi, cg, scanopts, drvopts, devopts);
}

View File

@ -182,8 +182,8 @@ static int check_channel_group(struct dev_context *devc,
return CG_INVALID;
}
static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_get(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
int ret, cg_type;
unsigned int i;
@ -282,8 +282,8 @@ static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *s
return ret;
}
static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_set(uint32_t key, GVariant *data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
int ret, cg_type;
unsigned int i, j;
@ -437,7 +437,7 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd
}
static int config_channel_set(const struct sr_dev_inst *sdi,
struct sr_channel *ch, unsigned int changes)
struct sr_channel *ch, unsigned int changes)
{
/* Currently we only handle SR_CHANNEL_SET_ENABLED. */
if (changes != SR_CHANNEL_SET_ENABLED)
@ -446,8 +446,8 @@ static int config_channel_set(const struct sr_dev_inst *sdi,
return dlm_channel_state_set(sdi, ch->index, ch->enabled);
}
static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_list(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
int cg_type = CG_NONE;
struct dev_context *devc;

View File

@ -327,8 +327,8 @@ static int dev_close(struct sr_dev_inst *sdi)
return SR_OK;
}
static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_get(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc;
GVariant *range[2];
@ -359,8 +359,8 @@ static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *s
return SR_OK;
}
static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_set(uint32_t key, GVariant *data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc;
gdouble low, high;
@ -386,8 +386,8 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd
return SR_OK;
}
static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_list(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct dev_context *devc;
GVariant *grange[2];

View File

@ -250,8 +250,8 @@ static int dev_close(struct sr_dev_inst *sdi)
return SR_OK;
}
static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_get(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct session_vdev *vdev;
@ -276,8 +276,8 @@ static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *s
return SR_OK;
}
static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_set(uint32_t key, GVariant *data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
struct session_vdev *vdev;
@ -316,8 +316,8 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd
return SR_OK;
}
static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
static int config_list(uint32_t key, GVariant **data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
return STD_CONFIG_LIST(key, data, sdi, cg, NULL, NULL, devopts);
}