aboutsummaryrefslogtreecommitdiff
path: root/drivers/iio/light/rpr0521.c
diff options
context:
space:
mode:
authorMikko Koivunen2017-05-18 15:12:52 +0300
committerJonathan Cameron2017-05-21 15:06:12 +0100
commitae5916501b8d45b0585171f4e4ada7c64493813b (patch)
treed034022004a9f7ad167356c9f2e8bf33da7ba2ab /drivers/iio/light/rpr0521.c
parent484c314b90ae240fb8e6e2924722deb92c756d93 (diff)
iio: light: rpr0521 magic number to sizeof() on value read
Changed magic number to sizeof() on value read. Signed-off-by: Mikko Koivunen <mikko.koivunen@fi.rohmeurope.com> Acked-by: Daniel Baluta <daniel.baluta@nxp.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio/light/rpr0521.c')
-rw-r--r--drivers/iio/light/rpr0521.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/light/rpr0521.c b/drivers/iio/light/rpr0521.c
index 921981978598..38095d79a874 100644
--- a/drivers/iio/light/rpr0521.c
+++ b/drivers/iio/light/rpr0521.c
@@ -356,7 +356,7 @@ static int rpr0521_read_raw(struct iio_dev *indio_dev,
ret = regmap_bulk_read(data->regmap,
rpr0521_data_reg[chan->address].address,
- &raw_data, 2);
+ &raw_data, sizeof(raw_data));
if (ret < 0) {
rpr0521_set_power_state(data, false, device_mask);
mutex_unlock(&data->lock);