From 5759a14d829354aea9dd639d7dc41ac35db11ab5 Mon Sep 17 00:00:00 2001 From: H Hartley Sweeten Date: Wed, 22 Oct 2014 15:36:39 -0700 Subject: [PATCH] staging: comedi: hwdrv_apci3120: use comedi_buf_write_samples() 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 Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- 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 10deb72a4b37..4959fc663d85 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.34.1