From: Mikko Koivunen Date: Thu, 18 May 2017 12:12:52 +0000 (+0300) Subject: iio: light: rpr0521 magic number to sizeof() on value read X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ae5916501b8d45b0585171f4e4ada7c64493813b;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git iio: light: rpr0521 magic number to sizeof() on value read Changed magic number to sizeof() on value read. Signed-off-by: Mikko Koivunen Acked-by: Daniel Baluta Signed-off-by: Jonathan Cameron --- 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);