Message ID | 20210725172458.487343-2-jic23@kernel.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | iio:adc:ad7124: Convert to generic firmware handling | expand |
diff --git a/drivers/iio/adc/ad7124.c b/drivers/iio/adc/ad7124.c index e45c600fccc0..b2e49386d7dc 100644 --- a/drivers/iio/adc/ad7124.c +++ b/drivers/iio/adc/ad7124.c @@ -765,7 +765,6 @@ static int ad7124_of_parse_channel_config(struct iio_dev *indio_dev, st->channels = channels; for_each_available_child_of_node(np, child) { - cfg = &st->channels[channel].cfg; ret = of_property_read_u32(child, "reg", &channel); if (ret) @@ -778,6 +777,8 @@ static int ad7124_of_parse_channel_config(struct iio_dev *indio_dev, goto err; } + cfg = &st->channels[channel].cfg; + ret = of_property_read_u32_array(child, "diff-channels", ain, 2); if (ret)