staging: comedi: hwdrv_apci3120: use comedi_buf_write_samples()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Wed, 22 Oct 2014 22:36:39 +0000 (15:36 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Oct 2014 08:03:12 +0000 (16:03 +0800)
Use comedi_buf_write_samples() to add the samples to the async buffer.
That function will handle the '* sizeof(foo)' calculation to determine
the number of bytes to add.

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/addi-data/hwdrv_apci3120.c

index 10deb72a4b37fe7dba660e3b141632b871e8b640..4959fc663d85b6f792708fcaf5aea8718b5093fe 100644 (file)
@@ -1172,7 +1172,7 @@ static void v_APCI3120_InterruptDmaMoveBlock16bit(struct comedi_device *dev,
        s->async->cur_chan += num_samples;
        s->async->cur_chan %= cmd->scan_end_arg;
 
-       cfc_write_array_to_buffer(s, dma_buffer, num_samples * sizeof(short));
+       comedi_buf_write_samples(s, dma_buffer, num_samples);
 }
 
 /*