Skip to content

Commit 03779df

Browse files
committed
iio: adc: ad7280a: Fix wrong variable used when setting thresholds.
Name of variable change missed in refactoring patch. Fixes: 112bf4a ("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]> Link: https://lore.kernel.org/r/[email protected]
1 parent d85cce8 commit 03779df

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

drivers/iio/adc/ad7280a.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -745,15 +745,15 @@ static int ad7280a_write_thresh(struct iio_dev *indio_dev,
745745
case IIO_EV_DIR_RISING:
746746
addr = AD7280A_CELL_OVERVOLTAGE_REG;
747747
ret = ad7280_write(st, AD7280A_DEVADDR_MASTER, addr,
748-
1, val);
748+
1, value);
749749
if (ret)
750750
break;
751751
st->cell_threshhigh = value;
752752
break;
753753
case IIO_EV_DIR_FALLING:
754754
addr = AD7280A_CELL_UNDERVOLTAGE_REG;
755755
ret = ad7280_write(st, AD7280A_DEVADDR_MASTER, addr,
756-
1, val);
756+
1, value);
757757
if (ret)
758758
break;
759759
st->cell_threshlow = value;
@@ -770,18 +770,18 @@ static int ad7280a_write_thresh(struct iio_dev *indio_dev,
770770
case IIO_EV_DIR_RISING:
771771
addr = AD7280A_AUX_ADC_OVERVOLTAGE_REG;
772772
ret = ad7280_write(st, AD7280A_DEVADDR_MASTER, addr,
773-
1, val);
773+
1, value);
774774
if (ret)
775775
break;
776-
st->aux_threshhigh = val;
776+
st->aux_threshhigh = value;
777777
break;
778778
case IIO_EV_DIR_FALLING:
779779
addr = AD7280A_AUX_ADC_UNDERVOLTAGE_REG;
780780
ret = ad7280_write(st, AD7280A_DEVADDR_MASTER, addr,
781-
1, val);
781+
1, value);
782782
if (ret)
783783
break;
784-
st->aux_threshlow = val;
784+
st->aux_threshlow = value;
785785
break;
786786
default:
787787
ret = -EINVAL;

0 commit comments

Comments
 (0)