aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iio/adc/ad7124.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-01-22 09:05:34 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-01-22 09:05:34 +0100
commitc318f074d9fdeae16e19cbb2ed53b50d2bcdfdb8 (patch)
tree44c6552fa919dfe1fc681949bf5d81fcf6a2beb8 /drivers/iio/adc/ad7124.c
parentMerge tag 'iio-for-5.6b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next (diff)
parentLinux 5.5-rc7 (diff)
downloadlinux-dev-c318f074d9fdeae16e19cbb2ed53b50d2bcdfdb8.tar.xz
linux-dev-c318f074d9fdeae16e19cbb2ed53b50d2bcdfdb8.zip
Merge 5.5-rc7 into staging-next
We want the staging fixes in here as well Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/iio/adc/ad7124.c')
-rw-r--r--drivers/iio/adc/ad7124.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/iio/adc/ad7124.c b/drivers/iio/adc/ad7124.c
index 52f45b13da4a..d9915dc71d1e 100644
--- a/drivers/iio/adc/ad7124.c
+++ b/drivers/iio/adc/ad7124.c
@@ -496,13 +496,11 @@ static int ad7124_of_parse_channel_config(struct iio_dev *indio_dev,
st->channel_config[channel].buf_negative =
of_property_read_bool(child, "adi,buffered-negative");
- *chan = ad7124_channel_template;
- chan->address = channel;
- chan->scan_index = channel;
- chan->channel = ain[0];
- chan->channel2 = ain[1];
-
- chan++;
+ chan[channel] = ad7124_channel_template;
+ chan[channel].address = channel;
+ chan[channel].scan_index = channel;
+ chan[channel].channel = ain[0];
+ chan[channel].channel2 = ain[1];
}
return 0;