iio: light: veml6030: remove unnecessary read of IT index

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>
This commit is contained in:
Javier Carrasco 2026-05-14 14:01:12 +13:00 committed by Jonathan Cameron
parent 43a66cae2e
commit 9ad241c711

View 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)