Skip to content

Commit

Permalink
iio: cm32181: Fix read integration time function
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Beomho Seo authored and Jonathan Cameron committed Mar 15, 2014
1 parent 467a44b commit 41c897f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/iio/light/cm32181.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 41c897f

Please sign in to comment.