staging: comedi: das16m1: use comedi_buf_write_samples()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Wed, 22 Oct 2014 22:36:40 +0000 (15:36 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Oct 2014 08:03:12 +0000 (16:03 +0800)
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 <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/das16m1.c

index f98bcbe0d72ae41e4ed3a2ff0f8c5b33528d3a4f..54ccffca8497c6b4d23bb1aa743aa45e0abc0fa6 100644 (file)
@@ -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) {