linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] iio: adjd_s311: Fix non-scan mode data read
@ 2013-08-18 12:59 Peter Meerwald
  2013-08-18 12:59 ` [PATCH 2/2] iio: adjd_s311: Cleanup unused #defines Peter Meerwald
  2013-08-19 18:54 ` [PATCH 1/2] iio: adjd_s311: Fix non-scan mode data read Jonathan Cameron
  0 siblings, 2 replies; 4+ messages in thread
From: Peter Meerwald @ 2013-08-18 12:59 UTC (permalink / raw)
  To: linux-iio; +Cc: Peter Meerwald

forgot to convert channel index to data register

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
---
 drivers/iio/light/adjd_s311.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/iio/light/adjd_s311.c b/drivers/iio/light/adjd_s311.c
index 55b9e18..c4b730d 100644
--- a/drivers/iio/light/adjd_s311.c
+++ b/drivers/iio/light/adjd_s311.c
@@ -232,7 +232,8 @@ static int adjd_s311_read_raw(struct iio_dev *indio_dev,
 
 	switch (mask) {
 	case IIO_CHAN_INFO_RAW:
-		ret = adjd_s311_read_data(indio_dev, chan->address, val);
+		ret = adjd_s311_read_data(indio_dev,
+			ADJD_S311_DATA_REG(chan->address), val);
 		if (ret < 0)
 			return ret;
 		return IIO_VAL_INT;
-- 
1.8.3.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-08-19 18:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-18 12:59 [PATCH 1/2] iio: adjd_s311: Fix non-scan mode data read Peter Meerwald
2013-08-18 12:59 ` [PATCH 2/2] iio: adjd_s311: Cleanup unused #defines Peter Meerwald
2013-08-19 19:12   ` Jonathan Cameron
2013-08-19 18:54 ` [PATCH 1/2] iio: adjd_s311: Fix non-scan mode data read Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).