Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −39
Original line number Diff line number Diff line
@@ -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),
			},