All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] iio: cm32181: Fix read integration time function
@ 2014-03-12  0:57 Beomho Seo
  0 siblings, 0 replies; only message in thread
From: Beomho Seo @ 2014-03-12  0:57 UTC (permalink / raw)
  To: linux-iio, Kevin Tsai
  Cc: Jonathan Cameron, Myungjoo Ham, Jaehoon Chung, wingt, josephh

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

Cc: Kevin Tsai <ktsai@capellamicro.com>
Signed-off-by: Beomho Seo <beomho.seo@samsung.com>
---
 drivers/iio/light/cm32181.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/iio/light/cm32181.c b/drivers/iio/light/cm32181.c
index 47a6dba..d976e6c 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;
 	}
-- 
1.7.9.5

-- 
Best Regards,

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2014-03-12  0:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-12  0:57 [PATCH] iio: cm32181: Fix read integration time function Beomho Seo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.