diff options
author | Peter Meerwald <pmeerw@pmeerw.net> | 2013-08-18 14:59:00 +0200 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2013-08-19 20:30:21 +0200 |
commit | 71f42642af7b1bc7c36fb73ad8f7e7ab2ab8b2de (patch) | |
tree | e5e56531a153cace5a64b8ce9262ea126e30da6b /drivers/iio/light | |
parent | Linux 3.11-rc5 (diff) | |
download | linux-71f42642af7b1bc7c36fb73ad8f7e7ab2ab8b2de.tar.xz linux-71f42642af7b1bc7c36fb73ad8f7e7ab2ab8b2de.zip |
iio: adjd_s311: Fix non-scan mode data read
forgot to convert channel index to data register
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio/light')
-rw-r--r-- | drivers/iio/light/adjd_s311.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/iio/light/adjd_s311.c b/drivers/iio/light/adjd_s311.c index 5f4749e60b04..c1cd5698b8ae 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; |