From: H Hartley Sweeten Date: Wed, 22 Oct 2014 22:36:39 +0000 (-0700) Subject: staging: comedi: hwdrv_apci3120: use comedi_buf_write_samples() X-Git-Tag: v3.19-rc1~66^2~763 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=5759a14d829354aea9dd639d7dc41ac35db11ab5;p=karo-tx-linux.git 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 --- 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); } /*