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