Commit 58dffaed authored by Jonathan Cameron's avatar Jonathan Cameron Committed by Greg Kroah-Hartman

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: default avatarJonathan Cameron <jic23@cam.ac.uk>
Acked-by: default avatarMichael Hennerich <michael.hennerich@analog.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent b79c9a3c
...@@ -153,7 +153,7 @@ static int ad799x_read_raw(struct iio_dev *dev_info, ...@@ -153,7 +153,7 @@ static int ad799x_read_raw(struct iio_dev *dev_info,
ret = ad799x_single_channel_from_ring(dev_info, ret = ad799x_single_channel_from_ring(dev_info,
chan->scan_index); chan->scan_index);
else else
ret = ad799x_scan_direct(st, chan->address); ret = ad799x_scan_direct(st, chan->scan_index);
mutex_unlock(&dev_info->mlock); mutex_unlock(&dev_info->mlock);
if (ret < 0) if (ret < 0)
...@@ -454,7 +454,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { ...@@ -454,7 +454,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = {
.type = IIO_VOLTAGE, .type = IIO_VOLTAGE,
.indexed = 1, .indexed = 1,
.channel = 0, .channel = 0,
.address = 0,
.scan_index = 0, .scan_index = 0,
.scan_type = IIO_ST('u', 12, 16, 0), .scan_type = IIO_ST('u', 12, 16, 0),
}, },
...@@ -462,7 +461,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { ...@@ -462,7 +461,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = {
.type = IIO_VOLTAGE, .type = IIO_VOLTAGE,
.indexed = 1, .indexed = 1,
.channel = 1, .channel = 1,
.address = 1,
.scan_index = 1, .scan_index = 1,
.scan_type = IIO_ST('u', 12, 16, 0), .scan_type = IIO_ST('u', 12, 16, 0),
}, },
...@@ -470,7 +468,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { ...@@ -470,7 +468,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = {
.type = IIO_VOLTAGE, .type = IIO_VOLTAGE,
.indexed = 1, .indexed = 1,
.channel = 2, .channel = 2,
.address = 2,
.scan_index = 2, .scan_index = 2,
.scan_type = IIO_ST('u', 12, 16, 0), .scan_type = IIO_ST('u', 12, 16, 0),
}, },
...@@ -478,7 +475,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { ...@@ -478,7 +475,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = {
.type = IIO_VOLTAGE, .type = IIO_VOLTAGE,
.indexed = 1, .indexed = 1,
.channel = 3, .channel = 3,
.address = 3,
.scan_index = 3, .scan_index = 3,
.scan_type = IIO_ST('u', 12, 16, 0), .scan_type = IIO_ST('u', 12, 16, 0),
}, },
...@@ -494,7 +490,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { ...@@ -494,7 +490,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = {
.type = IIO_VOLTAGE, .type = IIO_VOLTAGE,
.indexed = 1, .indexed = 1,
.channel = 0, .channel = 0,
.address = 0,
.scan_index = 0, .scan_index = 0,
.scan_type = IIO_ST('u', 10, 16, 2), .scan_type = IIO_ST('u', 10, 16, 2),
}, },
...@@ -502,7 +497,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { ...@@ -502,7 +497,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = {
.type = IIO_VOLTAGE, .type = IIO_VOLTAGE,
.indexed = 1, .indexed = 1,
.channel = 1, .channel = 1,
.address = 1,
.scan_index = 1, .scan_index = 1,
.scan_type = IIO_ST('u', 10, 16, 2), .scan_type = IIO_ST('u', 10, 16, 2),
}, },
...@@ -510,7 +504,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { ...@@ -510,7 +504,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = {
.type = IIO_VOLTAGE, .type = IIO_VOLTAGE,
.indexed = 1, .indexed = 1,
.channel = 2, .channel = 2,
.address = 2,
.scan_index = 2, .scan_index = 2,
.scan_type = IIO_ST('u', 10, 16, 2), .scan_type = IIO_ST('u', 10, 16, 2),
}, },
...@@ -518,7 +511,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { ...@@ -518,7 +511,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = {
.type = IIO_VOLTAGE, .type = IIO_VOLTAGE,
.indexed = 1, .indexed = 1,
.channel = 3, .channel = 3,
.address = 3,
.scan_index = 3, .scan_index = 3,
.scan_type = IIO_ST('u', 10, 16, 2), .scan_type = IIO_ST('u', 10, 16, 2),
}, },
...@@ -534,7 +526,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { ...@@ -534,7 +526,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = {
.type = IIO_VOLTAGE, .type = IIO_VOLTAGE,
.indexed = 1, .indexed = 1,
.channel = 0, .channel = 0,
.address = 0,
.scan_index = 0, .scan_index = 0,
.scan_type = IIO_ST('u', 8, 16, 4), .scan_type = IIO_ST('u', 8, 16, 4),
}, },
...@@ -542,7 +533,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { ...@@ -542,7 +533,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = {
.type = IIO_VOLTAGE, .type = IIO_VOLTAGE,
.indexed = 1, .indexed = 1,
.channel = 1, .channel = 1,
.address = 1,
.scan_index = 1, .scan_index = 1,
.scan_type = IIO_ST('u', 8, 16, 4), .scan_type = IIO_ST('u', 8, 16, 4),
}, },
...@@ -550,7 +540,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { ...@@ -550,7 +540,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = {
.type = IIO_VOLTAGE, .type = IIO_VOLTAGE,
.indexed = 1, .indexed = 1,
.channel = 2, .channel = 2,
.address = 2,
.scan_index = 2, .scan_index = 2,
.scan_type = IIO_ST('u', 8, 16, 4), .scan_type = IIO_ST('u', 8, 16, 4),
}, },
...@@ -558,7 +547,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { ...@@ -558,7 +547,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = {
.type = IIO_VOLTAGE, .type = IIO_VOLTAGE,
.indexed = 1, .indexed = 1,
.channel = 3, .channel = 3,
.address = 3,
.scan_index = 3, .scan_index = 3,
.scan_type = IIO_ST('u', 8, 16, 4), .scan_type = IIO_ST('u', 8, 16, 4),
}, },
...@@ -574,7 +562,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { ...@@ -574,7 +562,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = {
.type = IIO_VOLTAGE, .type = IIO_VOLTAGE,
.indexed = 1, .indexed = 1,
.channel = 0, .channel = 0,
.address = 0,
.scan_index = 0, .scan_index = 0,
.scan_type = IIO_ST('u', 12, 16, 0), .scan_type = IIO_ST('u', 12, 16, 0),
.event_mask = AD799X_EV_MASK, .event_mask = AD799X_EV_MASK,
...@@ -583,7 +570,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { ...@@ -583,7 +570,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = {
.type = IIO_VOLTAGE, .type = IIO_VOLTAGE,
.indexed = 1, .indexed = 1,
.channel = 1, .channel = 1,
.address = 1,
.scan_index = 1, .scan_index = 1,
.scan_type = IIO_ST('u', 12, 16, 0), .scan_type = IIO_ST('u', 12, 16, 0),
.event_mask = AD799X_EV_MASK, .event_mask = AD799X_EV_MASK,
...@@ -601,7 +587,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { ...@@ -601,7 +587,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = {
.type = IIO_VOLTAGE, .type = IIO_VOLTAGE,
.indexed = 1, .indexed = 1,
.channel = 0, .channel = 0,
.address = 0,
.scan_index = 0, .scan_index = 0,
.scan_type = IIO_ST('u', 10, 16, 2), .scan_type = IIO_ST('u', 10, 16, 2),
.event_mask = AD799X_EV_MASK, .event_mask = AD799X_EV_MASK,
...@@ -610,7 +595,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { ...@@ -610,7 +595,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = {
.type = IIO_VOLTAGE, .type = IIO_VOLTAGE,
.indexed = 1, .indexed = 1,
.channel = 1, .channel = 1,
.address = 1,
.scan_index = 1, .scan_index = 1,
.scan_type = IIO_ST('u', 10, 16, 2), .scan_type = IIO_ST('u', 10, 16, 2),
.event_mask = AD799X_EV_MASK, .event_mask = AD799X_EV_MASK,
...@@ -619,7 +603,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { ...@@ -619,7 +603,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = {
.type = IIO_VOLTAGE, .type = IIO_VOLTAGE,
.indexed = 1, .indexed = 1,
.channel = 2, .channel = 2,
.address = 2,
.scan_index = 2, .scan_index = 2,
.scan_type = IIO_ST('u', 10, 16, 2), .scan_type = IIO_ST('u', 10, 16, 2),
.event_mask = AD799X_EV_MASK, .event_mask = AD799X_EV_MASK,
...@@ -628,7 +611,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { ...@@ -628,7 +611,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = {
.type = IIO_VOLTAGE, .type = IIO_VOLTAGE,
.indexed = 1, .indexed = 1,
.channel = 3, .channel = 3,
.address = 3,
.scan_index = 3, .scan_index = 3,
.scan_type = IIO_ST('u', 10, 16, 2), .scan_type = IIO_ST('u', 10, 16, 2),
.event_mask = AD799X_EV_MASK, .event_mask = AD799X_EV_MASK,
...@@ -646,7 +628,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { ...@@ -646,7 +628,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = {
.type = IIO_VOLTAGE, .type = IIO_VOLTAGE,
.indexed = 1, .indexed = 1,
.channel = 0, .channel = 0,
.address = 0,
.scan_index = 0, .scan_index = 0,
.scan_type = IIO_ST('u', 12, 16, 0), .scan_type = IIO_ST('u', 12, 16, 0),
.event_mask = AD799X_EV_MASK, .event_mask = AD799X_EV_MASK,
...@@ -655,7 +636,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { ...@@ -655,7 +636,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = {
.type = IIO_VOLTAGE, .type = IIO_VOLTAGE,
.indexed = 1, .indexed = 1,
.channel = 1, .channel = 1,
.address = 1,
.scan_index = 1, .scan_index = 1,
.scan_type = IIO_ST('u', 12, 16, 0), .scan_type = IIO_ST('u', 12, 16, 0),
.event_mask = AD799X_EV_MASK, .event_mask = AD799X_EV_MASK,
...@@ -664,7 +644,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { ...@@ -664,7 +644,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = {
.type = IIO_VOLTAGE, .type = IIO_VOLTAGE,
.indexed = 1, .indexed = 1,
.channel = 2, .channel = 2,
.address = 2,
.scan_index = 2, .scan_index = 2,
.scan_type = IIO_ST('u', 12, 16, 0), .scan_type = IIO_ST('u', 12, 16, 0),
.event_mask = AD799X_EV_MASK, .event_mask = AD799X_EV_MASK,
...@@ -673,7 +652,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { ...@@ -673,7 +652,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = {
.type = IIO_VOLTAGE, .type = IIO_VOLTAGE,
.indexed = 1, .indexed = 1,
.channel = 3, .channel = 3,
.address = 3,
.scan_index = 3, .scan_index = 3,
.scan_type = IIO_ST('u', 12, 16, 0), .scan_type = IIO_ST('u', 12, 16, 0),
.event_mask = AD799X_EV_MASK, .event_mask = AD799X_EV_MASK,
...@@ -691,7 +669,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { ...@@ -691,7 +669,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = {
.type = IIO_VOLTAGE, .type = IIO_VOLTAGE,
.indexed = 1, .indexed = 1,
.channel = 0, .channel = 0,
.address = 0,
.scan_index = 0, .scan_index = 0,
.scan_type = IIO_ST('u', 10, 16, 2), .scan_type = IIO_ST('u', 10, 16, 2),
.event_mask = AD799X_EV_MASK, .event_mask = AD799X_EV_MASK,
...@@ -700,7 +677,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { ...@@ -700,7 +677,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = {
.type = IIO_VOLTAGE, .type = IIO_VOLTAGE,
.indexed = 1, .indexed = 1,
.channel = 1, .channel = 1,
.address = 1,
.scan_index = 1, .scan_index = 1,
.scan_type = IIO_ST('u', 10, 16, 2), .scan_type = IIO_ST('u', 10, 16, 2),
.event_mask = AD799X_EV_MASK, .event_mask = AD799X_EV_MASK,
...@@ -709,7 +685,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { ...@@ -709,7 +685,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = {
.type = IIO_VOLTAGE, .type = IIO_VOLTAGE,
.indexed = 1, .indexed = 1,
.channel = 2, .channel = 2,
.address = 2,
.scan_index = 2, .scan_index = 2,
.scan_type = IIO_ST('u', 10, 16, 2), .scan_type = IIO_ST('u', 10, 16, 2),
.event_mask = AD799X_EV_MASK, .event_mask = AD799X_EV_MASK,
...@@ -718,7 +693,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { ...@@ -718,7 +693,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = {
.type = IIO_VOLTAGE, .type = IIO_VOLTAGE,
.indexed = 1, .indexed = 1,
.channel = 3, .channel = 3,
.address = 3,
.scan_index = 3, .scan_index = 3,
.scan_type = IIO_ST('u', 10, 16, 2), .scan_type = IIO_ST('u', 10, 16, 2),
.event_mask = AD799X_EV_MASK, .event_mask = AD799X_EV_MASK,
...@@ -727,7 +701,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { ...@@ -727,7 +701,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = {
.type = IIO_VOLTAGE, .type = IIO_VOLTAGE,
.indexed = 1, .indexed = 1,
.channel = 4, .channel = 4,
.address = 4,
.scan_index = 4, .scan_index = 4,
.scan_type = IIO_ST('u', 10, 16, 2), .scan_type = IIO_ST('u', 10, 16, 2),
}, },
...@@ -735,7 +708,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { ...@@ -735,7 +708,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = {
.type = IIO_VOLTAGE, .type = IIO_VOLTAGE,
.indexed = 1, .indexed = 1,
.channel = 5, .channel = 5,
.address = 5,
.scan_index = 5, .scan_index = 5,
.scan_type = IIO_ST('u', 10, 16, 2), .scan_type = IIO_ST('u', 10, 16, 2),
}, },
...@@ -743,7 +715,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { ...@@ -743,7 +715,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = {
.type = IIO_VOLTAGE, .type = IIO_VOLTAGE,
.indexed = 1, .indexed = 1,
.channel = 6, .channel = 6,
.address = 6,
.scan_index = 6, .scan_index = 6,
.scan_type = IIO_ST('u', 10, 16, 2), .scan_type = IIO_ST('u', 10, 16, 2),
}, },
...@@ -751,7 +722,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { ...@@ -751,7 +722,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = {
.type = IIO_VOLTAGE, .type = IIO_VOLTAGE,
.indexed = 1, .indexed = 1,
.channel = 7, .channel = 7,
.address = 7,
.scan_index = 7, .scan_index = 7,
.scan_type = IIO_ST('u', 10, 16, 2), .scan_type = IIO_ST('u', 10, 16, 2),
}, },
...@@ -768,7 +738,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { ...@@ -768,7 +738,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = {
.type = IIO_VOLTAGE, .type = IIO_VOLTAGE,
.indexed = 1, .indexed = 1,
.channel = 0, .channel = 0,
.address = 0,
.scan_index = 0, .scan_index = 0,
.scan_type = IIO_ST('u', 12, 16, 0), .scan_type = IIO_ST('u', 12, 16, 0),
.event_mask = AD799X_EV_MASK, .event_mask = AD799X_EV_MASK,
...@@ -777,7 +746,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { ...@@ -777,7 +746,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = {
.type = IIO_VOLTAGE, .type = IIO_VOLTAGE,
.indexed = 1, .indexed = 1,
.channel = 1, .channel = 1,
.address = 1,
.scan_index = 1, .scan_index = 1,
.scan_type = IIO_ST('u', 12, 16, 0), .scan_type = IIO_ST('u', 12, 16, 0),
.event_mask = AD799X_EV_MASK, .event_mask = AD799X_EV_MASK,
...@@ -786,7 +754,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { ...@@ -786,7 +754,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = {
.type = IIO_VOLTAGE, .type = IIO_VOLTAGE,
.indexed = 1, .indexed = 1,
.channel = 2, .channel = 2,
.address = 2,
.scan_index = 2, .scan_index = 2,
.scan_type = IIO_ST('u', 12, 16, 0), .scan_type = IIO_ST('u', 12, 16, 0),
.event_mask = AD799X_EV_MASK, .event_mask = AD799X_EV_MASK,
...@@ -795,7 +762,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { ...@@ -795,7 +762,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = {
.type = IIO_VOLTAGE, .type = IIO_VOLTAGE,
.indexed = 1, .indexed = 1,
.channel = 3, .channel = 3,
.address = 3,
.scan_index = 3, .scan_index = 3,
.scan_type = IIO_ST('u', 12, 16, 0), .scan_type = IIO_ST('u', 12, 16, 0),
.event_mask = AD799X_EV_MASK, .event_mask = AD799X_EV_MASK,
...@@ -804,7 +770,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { ...@@ -804,7 +770,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = {
.type = IIO_VOLTAGE, .type = IIO_VOLTAGE,
.indexed = 1, .indexed = 1,
.channel = 4, .channel = 4,
.address = 4,
.scan_index = 4, .scan_index = 4,
.scan_type = IIO_ST('u', 12, 16, 0), .scan_type = IIO_ST('u', 12, 16, 0),
}, },
...@@ -812,7 +777,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { ...@@ -812,7 +777,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = {
.type = IIO_VOLTAGE, .type = IIO_VOLTAGE,
.indexed = 1, .indexed = 1,
.channel = 5, .channel = 5,
.address = 5,
.scan_index = 5, .scan_index = 5,
.scan_type = IIO_ST('u', 12, 16, 0), .scan_type = IIO_ST('u', 12, 16, 0),
}, },
...@@ -820,7 +784,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { ...@@ -820,7 +784,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = {
.type = IIO_VOLTAGE, .type = IIO_VOLTAGE,
.indexed = 1, .indexed = 1,
.channel = 6, .channel = 6,
.address = 6,
.scan_index = 6, .scan_index = 6,
.scan_type = IIO_ST('u', 12, 16, 0), .scan_type = IIO_ST('u', 12, 16, 0),
}, },
...@@ -828,7 +791,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { ...@@ -828,7 +791,6 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = {
.type = IIO_VOLTAGE, .type = IIO_VOLTAGE,
.indexed = 1, .indexed = 1,
.channel = 7, .channel = 7,
.address = 7,
.scan_index = 7, .scan_index = 7,
.scan_type = IIO_ST('u', 12, 16, 0), .scan_type = IIO_ST('u', 12, 16, 0),
}, },
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment