]> git.karo-electronics.de Git - linux-beck.git/commit
staging: comedi: cb_pcidas: introduce cb_pcidas_ao_load_fifo()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Wed, 22 Oct 2014 21:36:36 +0000 (14:36 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Oct 2014 08:01:19 +0000 (16:01 +0800)
commit2cc9854caf92526199935bc29685e253349362bc
tree69aca70c1dab7809cfef1dc4bcb65be262e12bef
parentbcdbe8848e8dbcd0bee3fcfa86c08f16c9730a15
staging: comedi: cb_pcidas: introduce cb_pcidas_ao_load_fifo()

Introduce a helper function to load the analog output FIFO.

This fixes a bug in cb_pcidas_ao_inttrig(). That function was writing
'num_bytes' data values to the FIFO instead of 'num_points'. This results
in twice the number of data values getting written to the FIFO.

Use comedi_buf_read_samples() read the analog output samples from the async
buffer.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/cb_pcidas.c