From b45a7beb3bc3c43e6abea5b3da9c8df8377540e8 Mon Sep 17 00:00:00 2001 From: H Hartley Sweeten Date: Wed, 22 Oct 2014 15:36:40 -0700 Subject: [PATCH] staging: comedi: das16m1: use comedi_buf_write_samples() Use comedi_buf_write_samples() to add the samples to the async buffer. The number of bytes to add is determined automatically based on the number of samples and the bytes_per_sample(). Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/das16m1.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/comedi/drivers/das16m1.c b/drivers/staging/comedi/drivers/das16m1.c index f98bcbe0d72a..54ccffca8497 100644 --- a/drivers/staging/comedi/drivers/das16m1.c +++ b/drivers/staging/comedi/drivers/das16m1.c @@ -442,8 +442,7 @@ static void das16m1_handler(struct comedi_device *dev, unsigned int status) num_samples = FIFO_SIZE; insw(dev->iobase, devpriv->ai_buffer, num_samples); munge_sample_array(devpriv->ai_buffer, num_samples); - cfc_write_array_to_buffer(s, devpriv->ai_buffer, - num_samples * sizeof(short)); + comedi_buf_write_samples(s, devpriv->ai_buffer, num_samples); devpriv->adc_count += num_samples; if (cmd->stop_src == TRIG_COUNT) { -- 2.30.2