staging:iio:ad7150: fix threshold mode config bit
authorMelissa Wen <melissa.srw@gmail.com>
Sun, 19 May 2019 01:04:56 +0000 (22:04 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 14 Jul 2019 06:11:05 +0000 (08:11 +0200)
commite3868c1a462f2bc41c0f1e584ca12a850fd2ebb9
treeb62062c4e0a1be94a6ac3d2e0f352d3553fc5001
parent6b1ce3971e05de54ae531484e3d93c2992d1bab9
staging:iio:ad7150: fix threshold mode config bit

[ Upstream commit df4d737ee4d7205aaa6275158aeebff87fd14488 ]

According to the AD7150 configuration register description, bit 7 assumes
value 1 when the threshold mode is fixed and 0 when it is adaptive,
however, the operation that identifies this mode was considering the
opposite values.

This patch renames the boolean variable to describe it correctly and
properly replaces it in the places where it is used.

Fixes: 531efd6aa0991 ("staging:iio:adc:ad7150: chan_spec conv + i2c_smbus commands + drop unused poweroff timeout control.")
Signed-off-by: Melissa Wen <melissa.srw@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/staging/iio/cdc/ad7150.c