From: Beomho Seo Date: Wed, 3 Dec 2014 00:57:00 +0000 (+0000) Subject: iio: cm32181: Fix read integration time function X-Git-Tag: v3.15-rc3~8^2~1^2~7 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=41c897f8789d0d1039ed873ddcd0caabd5756e0f;p=karo-tx-linux.git 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 Signed-off-by: Beomho Seo Signed-off-by: Jonathan Cameron --- 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; }