[PATCH 16/55] staging: comedi: hwdrv_apci3120: use comedi_buf_write_samples()

H Hartley Sweeten hsweeten at visionengravers.com
Wed Oct 22 22:36:39 UTC 2014


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 at visionengravers.com>
Cc: Ian Abbott <abbotti at mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
---
 drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c
index 10deb72..4959fc6 100644
--- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c
+++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c
@@ -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);
 }
 
 /*
-- 
2.0.3



More information about the devel mailing list