[PATCH 1/2] staging: comedi: rtd520: fix ai_read_n() async->cur_chan use

Ian Abbott abbotti at mev.co.uk
Fri Oct 31 10:39:28 UTC 2014


On 30/10/14 18:32, H Hartley Sweeten wrote:
> This functions uses the async->cur_chan to determine if the current channel
> is using a bipolar range and the sample needs to be munged. The cur_chan is
> never incremented so all the samples are munged based on the fist channel
> in the cmd->chanlist.
>
> Bump the cur_chan after writing each sample. This fixes the code so that
> the munging will be done correctly.
>
> Signed-off-by: H Hartley Sweeten <hsweeten at visionengravers.com>
> Cc: Ian Abbott <abbotti at mev.co.uk>
> Cc: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
> ---
>   drivers/staging/comedi/drivers/rtd520.c | 7 ++++++-
>   1 file changed, 6 insertions(+), 1 deletion(-)

Reviewed-by: Ian Abbott <abbotti at mev.co.uk>

-- 
-=( Ian Abbott @ MEV Ltd.    E-mail: <abbotti at mev.co.uk> )=-
-=(                          Web: http://www.mev.co.uk/  )=-


More information about the devel mailing list