iio: xilinx-xadc: Fix ADC-B powerdown
authorLars-Peter Clausen <lars@metafoo.de>
Fri, 3 Apr 2020 13:27:13 +0000 (15:27 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Apr 2020 14:33:12 +0000 (16:33 +0200)
commit6a956eb2e1a70ad0e9097c8b3f7084e7532c17e1
tree9b28e7ef58e8611103737b40f5249fea74e2aa9e
parentf83a969fcb0b5d4cfb7c22ac5d4a04b8ceb514f4
iio: xilinx-xadc: Fix ADC-B powerdown

commit e44ec7794d88f918805d700240211a9ec05ed89d upstream.

The check for shutting down the second ADC is inverted. This causes it to
be powered down when it should be enabled. As a result channels that are
supposed to be handled by the second ADC return invalid conversion results.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Fixes: bdc8cda1d010 ("iio:adc: Add Xilinx XADC driver")
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iio/adc/xilinx-xadc-core.c