On 07/04/17 13:07, Mikko Koivunen wrote: > Changed magic number to sizeof() on value read. > > Signed-off-by: Mikko Koivunen <mikko.koivunen@xxxxxxxxxxxxxxxxx> Nice little change. I'd have preferred it near the start of the set before you got going as it could have been picked up whilst the complex stuff was undergoing revision. Anyhow, will pick up when the rest is ready. Jonathan > --- > Tested on LeMaker HiKey AOSP7, kernel 4.4. > checkpatch.pl ok > --- > drivers/iio/light/rpr0521.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/iio/light/rpr0521.c b/drivers/iio/light/rpr0521.c > index 72f608d..75fd3ca 100644 > --- a/drivers/iio/light/rpr0521.c > +++ b/drivers/iio/light/rpr0521.c > @@ -662,7 +662,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); > -- To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html