Skip to contentSkip to conversation

iio: cm32181: Fix read integration time function

PATCH New Beomho Seo 1 participant 1 message Mar 12, 2014

Subsystems (2)
lore
Share & tools
lore

Beomho Seo

author
#0 lore raw

PATCH 1/1 iio: cm32181: Fix read integration time function

In read integration time function, assign 0 to val.
Because, prevent return inaccurate value when call read integration time.

---
 drivers/iio/light/cm32181.c |    1 +
 1 file changed, 1 insertion(+)
drivers/iio/light/cm32181.c +1 -0
index 47a6dba..d976e6c 100644
@@ -221,6 +221,7 @@ static int cm32181_read_raw(struct iio_dev *indio_dev,
 		*val = cm32181->calibscale;
 		return IIO_VAL_INT;
 	case IIO_CHAN_INFO_INT_TIME:
+		*val = 0;
 		ret = cm32181_read_als_it(cm32181, val2);
 		return ret;
 	}
Signature · 4 lines
1.7.9.5

-- 
Best Regards,