]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
staging:iio:ad7793: Fix scan index for the "shorted" channel
authorLars-Peter Clausen <lars@metafoo.de>
Wed, 27 Jun 2012 08:58:27 +0000 (10:58 +0200)
committerJonathan Cameron <jic23@kernel.org>
Sat, 30 Jun 2012 09:12:30 +0000 (10:12 +0100)
commit05eda67d2c31f3e8d815c3fc14f4dbb612363eab
treec217866fb7b0cd3c49eed2e85a6de91ff54354b2
parentce7b04c629254b884baa338730021b01298be921
staging:iio:ad7793: Fix scan index for the "shorted" channel

The code expects the scan index to match the offset of the channel into the
channel array. For the "shorted" the offset is 3, but the scan index is set to
2. Also the scan index 2 is already taken by the previous channel. As a result
the "shorted" channel will appear to be selected if the previous channel is
selected and vice versa and it is not possible to sample the "shorted" channel
in buffered mode.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/staging/iio/adc/ad7793.c