summaryrefslogtreecommitdiffstats
path: root/drivers/iio
diff options
context:
space:
mode:
authorBeomho Seo <beomho.seo@samsung.com>2014-12-03 01:57:00 +0100
committerJonathan Cameron <jic23@kernel.org>2014-03-15 16:16:42 +0100
commit41c897f8789d0d1039ed873ddcd0caabd5756e0f (patch)
treeb017e46248bfe4969567e2398895c7ef3218d0cc /drivers/iio
parentiio: adc: at91_adc: Repair broken platform_data support (diff)
downloadlinux-41c897f8789d0d1039ed873ddcd0caabd5756e0f.tar.xz
linux-41c897f8789d0d1039ed873ddcd0caabd5756e0f.zip
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. Cc: Stable@vger.kernel.org Cc: Kevin Tsai <ktsai@capellamicro.com> Signed-off-by: Beomho Seo <beomho.seo@samsung.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio')
-rw-r--r--drivers/iio/light/cm32181.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/iio/light/cm32181.c b/drivers/iio/light/cm32181.c
index 47a6dbac2d0c..d976e6ce60db 100644
--- a/drivers/iio/light/cm32181.c
+++ b/drivers/iio/light/cm32181.c
@@ -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;
}