Drivers: Explicitly list sr_samplerates fields.

This makes it a bit easier to understand which value means what, just
from looking at the driver code.
This commit is contained in:
Uwe Hermann 2013-01-29 12:55:00 +01:00
parent 063e7aef6d
commit d3b38ad389
6 changed files with 25 additions and 26 deletions

View File

@ -70,10 +70,10 @@ static const char *probe_names[NUM_PROBES + 1] = {
};
static const struct sr_samplerates samplerates = {
0,
0,
0,
supported_samplerates,
.low = 0,
.high = 0,
.step = 0,
.list = supported_samplerates,
};
static const int hwcaps[] = {

View File

@ -94,10 +94,10 @@ static const int hwcaps[] = {
};
static const struct sr_samplerates samplerates = {
SR_HZ(1),
SR_GHZ(1),
SR_HZ(1),
NULL,
.low = SR_HZ(1),
.high = SR_GHZ(1),
.step = SR_HZ(1),
.list = NULL,
};
static const char *pattern_strings[] = {

View File

@ -118,10 +118,10 @@ static const uint64_t supported_samplerates[] = {
};
static const struct sr_samplerates samplerates = {
0,
0,
0,
supported_samplerates,
.low = 0,
.high = 0,
.step = 0,
.list = supported_samplerates,
};
SR_PRIV struct sr_dev_driver fx2lafw_driver_info;

View File

@ -41,12 +41,11 @@ SR_PRIV const char *mso19_probe_names[NUM_PROBES + 1] = {
"0", "1", "2", "3", "4", "5", "6", "7", NULL
};
/*supported samplerates */
static const struct sr_samplerates samplerates = {
SR_HZ(100),
SR_MHZ(200),
SR_HZ(100),
NULL,
.low = SR_HZ(100),
.high = SR_MHZ(200),
.step = SR_HZ(100),
.list = NULL,
};
SR_PRIV struct sr_dev_driver link_mso19_driver_info;

View File

@ -44,12 +44,12 @@ SR_PRIV const char *ols_probe_names[NUM_PROBES + 1] = {
NULL,
};
/* default supported samplerates, can be overridden by device metadata */
/* Default supported samplerates, can be overridden by device metadata. */
static const struct sr_samplerates samplerates = {
SR_HZ(10),
SR_MHZ(200),
SR_HZ(1),
NULL,
.low = SR_HZ(10),
.high = SR_MHZ(200),
.step = SR_HZ(1),
.list = NULL,
};
SR_PRIV struct sr_dev_driver ols_driver_info;

View File

@ -126,10 +126,10 @@ static const uint64_t supported_samplerates[] = {
};
static const struct sr_samplerates samplerates = {
0,
0,
0,
supported_samplerates,
.low = 0,
.high = 0,
.step = 0,
.list = supported_samplerates,
};
/* Private, per-device-instance driver context. */