]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
iio: adc: ad7606: fix reading unnecessary data from device
authorBeniamin Bia <beniamin.bia@analog.com>
Mon, 4 Nov 2019 16:26:34 +0000 (18:26 +0200)
committerMarcelo Henrique Cerri <marcelo.cerri@canonical.com>
Fri, 17 Jan 2020 17:23:42 +0000 (14:23 -0300)
commit7014998a1f51efe97d003a037519e2322333bd0c
tree46dd894a87ed1cf92b26dcb005c3b75dea67fc25
parente603f00c11a1c1b61c1c80d41e9a78abb65641d0
iio: adc: ad7606: fix reading unnecessary data from device

BugLink: https://bugs.launchpad.net/bugs/1856869
commit 341826a065660d1b77d89e6335b6095cd654271c upstream.

When a conversion result is being read from ADC, the driver reads the
number of channels + 1 because it thinks that IIO_CHAN_SOFT_TIMESTAMP
is also a physical channel. This patch fixes this issue.

Fixes: 2985a5d88455 ("staging: iio: adc: ad7606: Move out of staging")
Reported-by: Robert Wörle <rwoerle@mibtec.de>
Signed-off-by: Beniamin Bia <beniamin.bia@analog.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Connor Kuehl <connor.kuehl@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/iio/adc/ad7606.c