Commit 41c897f8 authored by Beomho Seo's avatar Beomho Seo Committed by Jonathan Cameron

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: default avatarBeomho Seo <beomho.seo@samsung.com>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent 467a44b0
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment