This is a note to let you know that I've just added the patch titled
iio: inkern: fix iio_convert_raw_to_processed_unlocked
to the 3.10-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
iio-inkern-fix-iio_convert_raw_to_processed_unlocked.patch
and it can be found in the queue-3.10 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From f91d1b63a4e096d3023aaaafec9d9d3aff25997f Mon Sep 17 00:00:00 2001
From: Alexandre Belloni <[email protected]>
Date: Mon, 1 Jul 2013 17:40:00 +0100
Subject: iio: inkern: fix iio_convert_raw_to_processed_unlocked
From: Alexandre Belloni <[email protected]>
commit f91d1b63a4e096d3023aaaafec9d9d3aff25997f upstream.
When reading IIO_CHAN_INFO_OFFSET, the return value of iio_channel_read() for
success will be IIO_VAL*, checking for 0 is not correct.
Without this fix the offset applied by iio drivers will be ignored when
converting a raw value to one in appropriate base units (e.g mV) in
a IIO client drivers that use iio_convert_raw_to_processed including
iio-hwmon.
Signed-off-by: Alexandre Belloni <[email protected]>
Signed-off-by: Jonathan Cameron <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
drivers/iio/inkern.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/iio/inkern.c
+++ b/drivers/iio/inkern.c
@@ -451,7 +451,7 @@ static int iio_convert_raw_to_processed_
int ret;
ret = iio_channel_read(chan, &offset, NULL, IIO_CHAN_INFO_OFFSET);
- if (ret == 0)
+ if (ret >= 0)
raw64 += offset;
scale_type = iio_channel_read(chan, &scale_val, &scale_val2,
Patches currently in stable-queue which might be from
[email protected] are
queue-3.10/iio-inkern-fix-iio_convert_raw_to_processed_unlocked.patch
queue-3.10/iio-fix-iio_channel_has_info.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html