diff options
author | Jonathan Cameron <jic23@cam.ac.uk> | 2011-09-30 10:05:37 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-10-03 16:07:03 -0700 |
commit | 58dffaeddd2d59fc78eb2f218fda7cce81c66690 (patch) | |
tree | e1920794f311b80aeca9b759b5cc3cb433e02513 /drivers/staging/iio/adc/ad799x_core.c | |
parent | b79c9a3c1e9868873d7c60afeeec4bccf0f2deb7 (diff) |
staging:iio:adc:ad799x address and scan_index always match so stop using address
Saves on setting the value of address for the simple situation seen in this
device. They are already used interchangably to get data from the buffer.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/iio/adc/ad799x_core.c')
-rw-r--r-- | drivers/staging/iio/adc/ad799x_core.c | 40 |
1 files changed, 1 insertions, 39 deletions
diff --git a/drivers/staging/iio/adc/ad799x_core.c b/drivers/staging/iio/adc/ad799x_core.c index 19ddd69de938..7c42c12d8eeb 100644 --- a/drivers/staging/iio/adc/ad799x_core.c +++ b/drivers/staging/iio/adc/ad799x_core.c @@ -153,7 +153,7 @@ static int ad799x_read_raw(struct iio_dev *dev_info, ret = ad799x_single_channel_from_ring(dev_info, chan->scan_index); else - ret = ad799x_scan_direct(st, chan->address); + ret = ad799x_scan_direct(st, chan->scan_index); mutex_unlock(&dev_info->mlock); if (ret < 0) @@ -454,7 +454,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .type = IIO_VOLTAGE, .indexed = 1, .channel = 0, - .address = 0, .scan_index = 0, .scan_type = IIO_ST('u', 12, 16, 0), }, @@ -462,7 +461,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .type = IIO_VOLTAGE, .indexed = 1, .channel = 1, - .address = 1, .scan_index = 1, .scan_type = IIO_ST('u', 12, 16, 0), }, @@ -470,7 +468,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .type = IIO_VOLTAGE, .indexed = 1, .channel = 2, - .address = 2, .scan_index = 2, .scan_type = IIO_ST('u', 12, 16, 0), }, @@ -478,7 +475,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .type = IIO_VOLTAGE, .indexed = 1, .channel = 3, - .address = 3, .scan_index = 3, .scan_type = IIO_ST('u', 12, 16, 0), }, @@ -494,7 +490,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .type = IIO_VOLTAGE, .indexed = 1, .channel = 0, - .address = 0, .scan_index = 0, .scan_type = IIO_ST('u', 10, 16, 2), }, @@ -502,7 +497,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .type = IIO_VOLTAGE, .indexed = 1, .channel = 1, - .address = 1, .scan_index = 1, .scan_type = IIO_ST('u', 10, 16, 2), }, @@ -510,7 +504,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .type = IIO_VOLTAGE, .indexed = 1, .channel = 2, - .address = 2, .scan_index = 2, .scan_type = IIO_ST('u', 10, 16, 2), }, @@ -518,7 +511,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .type = IIO_VOLTAGE, .indexed = 1, .channel = 3, - .address = 3, .scan_index = 3, .scan_type = IIO_ST('u', 10, 16, 2), }, @@ -534,7 +526,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .type = IIO_VOLTAGE, .indexed = 1, .channel = 0, - .address = 0, .scan_index = 0, .scan_type = IIO_ST('u', 8, 16, 4), }, @@ -542,7 +533,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .type = IIO_VOLTAGE, .indexed = 1, .channel = 1, - .address = 1, .scan_index = 1, .scan_type = IIO_ST('u', 8, 16, 4), }, @@ -550,7 +540,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .type = IIO_VOLTAGE, .indexed = 1, .channel = 2, - .address = 2, .scan_index = 2, .scan_type = IIO_ST('u', 8, 16, 4), }, @@ -558,7 +547,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .type = IIO_VOLTAGE, .indexed = 1, .channel = 3, - .address = 3, .scan_index = 3, .scan_type = IIO_ST('u', 8, 16, 4), }, @@ -574,7 +562,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .type = IIO_VOLTAGE, .indexed = 1, .channel = 0, - .address = 0, .scan_index = 0, .scan_type = IIO_ST('u', 12, 16, 0), .event_mask = AD799X_EV_MASK, @@ -583,7 +570,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .type = IIO_VOLTAGE, .indexed = 1, .channel = 1, - .address = 1, .scan_index = 1, .scan_type = IIO_ST('u', 12, 16, 0), .event_mask = AD799X_EV_MASK, @@ -601,7 +587,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .type = IIO_VOLTAGE, .indexed = 1, .channel = 0, - .address = 0, .scan_index = 0, .scan_type = IIO_ST('u', 10, 16, 2), .event_mask = AD799X_EV_MASK, @@ -610,7 +595,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .type = IIO_VOLTAGE, .indexed = 1, .channel = 1, - .address = 1, .scan_index = 1, .scan_type = IIO_ST('u', 10, 16, 2), .event_mask = AD799X_EV_MASK, @@ -619,7 +603,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .type = IIO_VOLTAGE, .indexed = 1, .channel = 2, - .address = 2, .scan_index = 2, .scan_type = IIO_ST('u', 10, 16, 2), .event_mask = AD799X_EV_MASK, @@ -628,7 +611,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .type = IIO_VOLTAGE, .indexed = 1, .channel = 3, - .address = 3, .scan_index = 3, .scan_type = IIO_ST('u', 10, 16, 2), .event_mask = AD799X_EV_MASK, @@ -646,7 +628,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .type = IIO_VOLTAGE, .indexed = 1, .channel = 0, - .address = 0, .scan_index = 0, .scan_type = IIO_ST('u', 12, 16, 0), .event_mask = AD799X_EV_MASK, @@ -655,7 +636,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .type = IIO_VOLTAGE, .indexed = 1, .channel = 1, - .address = 1, .scan_index = 1, .scan_type = IIO_ST('u', 12, 16, 0), .event_mask = AD799X_EV_MASK, @@ -664,7 +644,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .type = IIO_VOLTAGE, .indexed = 1, .channel = 2, - .address = 2, .scan_index = 2, .scan_type = IIO_ST('u', 12, 16, 0), .event_mask = AD799X_EV_MASK, @@ -673,7 +652,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .type = IIO_VOLTAGE, .indexed = 1, .channel = 3, - .address = 3, .scan_index = 3, .scan_type = IIO_ST('u', 12, 16, 0), .event_mask = AD799X_EV_MASK, @@ -691,7 +669,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .type = IIO_VOLTAGE, .indexed = 1, .channel = 0, - .address = 0, .scan_index = 0, .scan_type = IIO_ST('u', 10, 16, 2), .event_mask = AD799X_EV_MASK, @@ -700,7 +677,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .type = IIO_VOLTAGE, .indexed = 1, .channel = 1, - .address = 1, .scan_index = 1, .scan_type = IIO_ST('u', 10, 16, 2), .event_mask = AD799X_EV_MASK, @@ -709,7 +685,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .type = IIO_VOLTAGE, .indexed = 1, .channel = 2, - .address = 2, .scan_index = 2, .scan_type = IIO_ST('u', 10, 16, 2), .event_mask = AD799X_EV_MASK, @@ -718,7 +693,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .type = IIO_VOLTAGE, .indexed = 1, .channel = 3, - .address = 3, .scan_index = 3, .scan_type = IIO_ST('u', 10, 16, 2), .event_mask = AD799X_EV_MASK, @@ -727,7 +701,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .type = IIO_VOLTAGE, .indexed = 1, .channel = 4, - .address = 4, .scan_index = 4, .scan_type = IIO_ST('u', 10, 16, 2), }, @@ -735,7 +708,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .type = IIO_VOLTAGE, .indexed = 1, .channel = 5, - .address = 5, .scan_index = 5, .scan_type = IIO_ST('u', 10, 16, 2), }, @@ -743,7 +715,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .type = IIO_VOLTAGE, .indexed = 1, .channel = 6, - .address = 6, .scan_index = 6, .scan_type = IIO_ST('u', 10, 16, 2), }, @@ -751,7 +722,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .type = IIO_VOLTAGE, .indexed = 1, .channel = 7, - .address = 7, .scan_index = 7, .scan_type = IIO_ST('u', 10, 16, 2), }, @@ -768,7 +738,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .type = IIO_VOLTAGE, .indexed = 1, .channel = 0, - .address = 0, .scan_index = 0, .scan_type = IIO_ST('u', 12, 16, 0), .event_mask = AD799X_EV_MASK, @@ -777,7 +746,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .type = IIO_VOLTAGE, .indexed = 1, .channel = 1, - .address = 1, .scan_index = 1, .scan_type = IIO_ST('u', 12, 16, 0), .event_mask = AD799X_EV_MASK, @@ -786,7 +754,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .type = IIO_VOLTAGE, .indexed = 1, .channel = 2, - .address = 2, .scan_index = 2, .scan_type = IIO_ST('u', 12, 16, 0), .event_mask = AD799X_EV_MASK, @@ -795,7 +762,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .type = IIO_VOLTAGE, .indexed = 1, .channel = 3, - .address = 3, .scan_index = 3, .scan_type = IIO_ST('u', 12, 16, 0), .event_mask = AD799X_EV_MASK, @@ -804,7 +770,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .type = IIO_VOLTAGE, .indexed = 1, .channel = 4, - .address = 4, .scan_index = 4, .scan_type = IIO_ST('u', 12, 16, 0), }, @@ -812,7 +777,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .type = IIO_VOLTAGE, .indexed = 1, .channel = 5, - .address = 5, .scan_index = 5, .scan_type = IIO_ST('u', 12, 16, 0), }, @@ -820,7 +784,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .type = IIO_VOLTAGE, .indexed = 1, .channel = 6, - .address = 6, .scan_index = 6, .scan_type = IIO_ST('u', 12, 16, 0), }, @@ -828,7 +791,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .type = IIO_VOLTAGE, .indexed = 1, .channel = 7, - .address = 7, .scan_index = 7, .scan_type = IIO_ST('u', 12, 16, 0), }, |