Skip to contentSkip to conversation

patch "iio: adc: mp2629: fix wrong comparison of channel" added to char-misc-linus

PATCH [email protected] 1 participant 1 message Nov 5, 2022

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

iio: adc: mp2629: fix wrong comparison of channel

to my char-misc git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
in the char-misc-linus branch.

The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)

The patch will hopefully also be merged in Linus's tree for the next -rc kernel release.

If you have any questions about this process, please let me know.

From 1eb20332a082fa801fb89c347c5e62de916a4001 Mon Sep 17 00:00:00 2001
From: Saravanan Sekar <[email protected]>
Date: Sat, 29 Oct 2022 11:29:53 +0200
Subject: iio: adc: mp2629: fix wrong comparison of channel

Input voltage channel enum is compared against iio address instead of the channel.

Fixes 7abd9fb64682 ("iio: adc: mp2629: Add support for mp2629 ADC driver")
---
 drivers/iio/adc/mp2629_adc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/adc/mp2629_adc.c +1 -1
index 30a31f185d08..f7af9af1665d 100644
@@ -74,7 +74,7 @@ static int mp2629_read_raw(struct iio_dev *indio_dev,
 		if (ret)
 			return ret;
 
-		if (chan->address == MP2629_INPUT_VOLT)
+		if (chan->channel == MP2629_INPUT_VOLT)
 			rval &= GENMASK(6, 0);
 		*val = rval;
 		return IIO_VAL_INT;
Signature · 1 line
2.38.1