iio: adc: ad7280a: Fix wrong variable used when setting thresholds.

Name of variable change missed in refactoring patch.

Fixes: 112bf4aa4a ("staging:iio:adc:ad7280a: Switch to standard event control")
Reported-by: Colin Ian King <colin.i.king@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Marcelo Schmitt <marcelo.schmitt1@gmail.com>
Reviewed-by: Marcelo Schmitt <marcelo.schmitt1@gmail.com>
Link: https://lore.kernel.org/r/20220226175604.662422-1-jic23@kernel.org
This commit is contained in:
Jonathan Cameron 2022-02-26 17:56:04 +00:00
Родитель d85cce86a8
Коммит 03779df928
1 изменённых файлов: 6 добавлений и 6 удалений

Просмотреть файл

@ -745,7 +745,7 @@ static int ad7280a_write_thresh(struct iio_dev *indio_dev,
case IIO_EV_DIR_RISING:
addr = AD7280A_CELL_OVERVOLTAGE_REG;
ret = ad7280_write(st, AD7280A_DEVADDR_MASTER, addr,
1, val);
1, value);
if (ret)
break;
st->cell_threshhigh = value;
@ -753,7 +753,7 @@ static int ad7280a_write_thresh(struct iio_dev *indio_dev,
case IIO_EV_DIR_FALLING:
addr = AD7280A_CELL_UNDERVOLTAGE_REG;
ret = ad7280_write(st, AD7280A_DEVADDR_MASTER, addr,
1, val);
1, value);
if (ret)
break;
st->cell_threshlow = value;
@ -770,18 +770,18 @@ static int ad7280a_write_thresh(struct iio_dev *indio_dev,
case IIO_EV_DIR_RISING:
addr = AD7280A_AUX_ADC_OVERVOLTAGE_REG;
ret = ad7280_write(st, AD7280A_DEVADDR_MASTER, addr,
1, val);
1, value);
if (ret)
break;
st->aux_threshhigh = val;
st->aux_threshhigh = value;
break;
case IIO_EV_DIR_FALLING:
addr = AD7280A_AUX_ADC_UNDERVOLTAGE_REG;
ret = ad7280_write(st, AD7280A_DEVADDR_MASTER, addr,
1, val);
1, value);
if (ret)
break;
st->aux_threshlow = val;
st->aux_threshlow = value;
break;
default:
ret = -EINVAL;