diff options
-rw-r--r-- | drivers/iio/light/noa1305.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/light/noa1305.c b/drivers/iio/light/noa1305.c index da83425fd910..25f63da70297 100644 --- a/drivers/iio/light/noa1305.c +++ b/drivers/iio/light/noa1305.c @@ -197,7 +197,7 @@ static int noa1305_write_raw(struct iio_dev *indio_dev, return -EINVAL; /* Look up integration time register settings and write it if found. */ - for (i = 0; i < ARRAY_SIZE(noa1305_int_time_available); i++) + for (i = 0; i < ARRAY_SIZE(noa1305_int_time_available) / 2; i++) if (noa1305_int_time_available[2 * i + 1] == val2) return regmap_write(priv->regmap, NOA1305_REG_INTEGRATION_TIME, i); |