From: H Hartley Sweeten Date: Wed, 22 Oct 2014 22:36:40 +0000 (-0700) Subject: staging: comedi: das16m1: use comedi_buf_write_samples() X-Git-Tag: firefly_0821_release~176^2~2665^2~762 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=b45a7beb3bc3c43e6abea5b3da9c8df8377540e8;p=firefly-linux-kernel-4.4.55.git 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 --- 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) {