]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
iio: light: veml6030: remove unnecessary read of IT index
authorJavier Carrasco <javier.carrasco.cruz@gmail.com>
Thu, 14 May 2026 01:01:12 +0000 (14:01 +1300)
committerJonathan Cameron <jic23@kernel.org>
Sun, 31 May 2026 09:59:41 +0000 (10:59 +0100)
This is dead code as the IT index is not used by gts to set the new scale.
In its current form, the value is read but not used afterward. Remove
the dead code.

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/light/veml6030.c

index 6bcacae3863c0e3a762afa48b0cba31303aa80b4..745cf3ad7092eb06260f3269a815393ca91a65f3 100644 (file)
@@ -521,13 +521,9 @@ static int veml6030_write_persistence(struct iio_dev *indio_dev,
 
 static int veml6030_set_scale(struct iio_dev *indio_dev, int val, int val2)
 {
-       int ret, gain_sel, it_idx, it_sel;
+       int ret, gain_sel, it_sel;
        struct veml6030_data *data = iio_priv(indio_dev);
 
-       ret = regmap_field_read(data->rf.it, &it_idx);
-       if (ret)
-               return ret;
-
        ret = iio_gts_find_gain_time_sel_for_scale(&data->gts, val, val2,
                                                   &gain_sel, &it_sel);
        if (ret)