Staging: comedi: pcl818: Correct AI scan counting and channel checks
For AI commands, the scan counter should be updated after every
scan. It was being updated after every sample except for DMA mode
where it was being updated after every repeated segment of the
channel list.
Also AI commands with multiple channels were being terminated with
an error prematurely except in DMA mode. This was because the
driver was comparing channel numbers received from the hardware
(combined with the sample value) with the expected channel numbers
to check for a "channel dropout". This test was failing
incorrectly because the driver was not keeping the current position
within the (repeated segment of the) channel list up to date.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
1 file changed