Skip to content

Commit 1eb2033

Browse files
ssekar15jic23
authored andcommitted
iio: adc: mp2629: fix wrong comparison of channel
Input voltage channel enum is compared against iio address instead of the channel. Fixes: 7abd9fb ("iio: adc: mp2629: Add support for mp2629 ADC driver") Signed-off-by: Saravanan Sekar <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Cc: <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
1 parent 741cec3 commit 1eb2033

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/iio/adc/mp2629_adc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ static int mp2629_read_raw(struct iio_dev *indio_dev,
7474
if (ret)
7575
return ret;
7676

77-
if (chan->address == MP2629_INPUT_VOLT)
77+
if (chan->channel == MP2629_INPUT_VOLT)
7878
rval &= GENMASK(6, 0);
7979
*val = rval;
8080
return IIO_VAL_INT;

0 commit comments

Comments
 (0)