iio: adc: ad7280a: Fix wrong variable used when setting thresholds.
Subsystems (2)
Jonathan Cameron
maintainerPATCH 1/1 iio: adc: ad7280a: Fix wrong variable used when setting thresholds.
From: Jonathan Cameron <[email protected]>
Name of variable change missed in refactoring patch.
Fixes 112bf4aa4afb ("staging:iio:adc:ad7280a: Switch to standard event control")
Reported-by Colin Ian King <[email protected]>
Signed-off-by Jonathan Cameron <[email protected]>
Cc Marcelo Schmitt <[email protected]>
---
Note that the fixes tag may not be stable. I'll update when applying if it has changed.
drivers/iio/adc/ad7280a.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/iio/adc/ad7280a.c +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 ;
Signature · 1 line
2.35.1
Quoted 8 lines · Jonathan Cameron
From: Jonathan Cameron <[email protected]>
Name of variable change missed in refactoring patch.
Fixes 112bf4aa4afb ("staging:iio:adc:ad7280a: Switch to standard event control")Reported-by Colin Ian King <[email protected]>Signed-off-by Jonathan Cameron <[email protected]>Cc Marcelo Schmitt <[email protected]>
Reviewed-by Marcelo Schmitt <[email protected]>
Quoted 11 lines · On Fri, 4 Mar 2022 23:39:40 -0300 Marcelo Schmitt <[email protected]>…
Quoted 8 lines · Jonathan Cameron
From: Jonathan Cameron <[email protected]>
Name of variable change missed in refactoring patch.
Fixes 112bf4aa4afb ("staging:iio:adc:ad7280a: Switch to standard event control")Reported-by Colin Ian King <[email protected]>Signed-off-by Jonathan Cameron <[email protected]>Cc Marcelo Schmitt <[email protected]>Reviewed-by Marcelo Schmitt <[email protected]>
Applied to the fixes-togreg branch of iio.git
Thanks,
Jonathan