Skip to contentSkip to conversation

iio:inkern: Fix typo/bug in convert raw to processed.

PATCH In review [email protected] 2 participants 2 messages Jun 3, 2013 – Jun 4, 2013 IIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iio:inkern: Fix typo/bug in convert raw to processed.

From: Michael Hennerich <[email protected]>

---
 drivers/iio/inkern.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/inkern.c +1 -1
index 795d100..442d529 100644
@@ -450,7 +450,7 @@ static int iio_convert_raw_to_processed_unlocked(struct iio_channel *chan,
 	s64 raw64 = raw;
 	int ret;
 
-	ret = iio_channel_read(chan, &offset, NULL, IIO_CHAN_INFO_SCALE);
+	ret = iio_channel_read(chan, &offset, NULL, IIO_CHAN_INFO_OFFSET);
 	if (ret == 0)
 		raw64 += offset;
 
Signature · 1 line
1.7.9.5
maintainer
#1 lore raw
Quoted 3 lines · On 06/03/2013 09:04 AM, [email protected] wrote:

From: Michael Hennerich <[email protected]>

oops. Applied to fixes-togreg branch of iio.git

Thanks,

Quoted 18 lines
---
 drivers/iio/inkern.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/inkern.c +1 -1
index 795d100..442d529 100644
@@ -450,7 +450,7 @@ static int iio_convert_raw_to_processed_unlocked(struct iio_channel *chan,
 	s64 raw64 = raw;
 	int ret;
 
-	ret = iio_channel_read(chan, &offset, NULL, IIO_CHAN_INFO_SCALE);
+	ret = iio_channel_read(chan, &offset, NULL, IIO_CHAN_INFO_OFFSET);
 	if (ret == 0)
 		raw64 += offset;