Commit b45a7beb authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

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: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5759a14d
...@@ -442,8 +442,7 @@ static void das16m1_handler(struct comedi_device *dev, unsigned int status) ...@@ -442,8 +442,7 @@ static void das16m1_handler(struct comedi_device *dev, unsigned int status)
num_samples = FIFO_SIZE; num_samples = FIFO_SIZE;
insw(dev->iobase, devpriv->ai_buffer, num_samples); insw(dev->iobase, devpriv->ai_buffer, num_samples);
munge_sample_array(devpriv->ai_buffer, num_samples); munge_sample_array(devpriv->ai_buffer, num_samples);
cfc_write_array_to_buffer(s, devpriv->ai_buffer, comedi_buf_write_samples(s, devpriv->ai_buffer, num_samples);
num_samples * sizeof(short));
devpriv->adc_count += num_samples; devpriv->adc_count += num_samples;
if (cmd->stop_src == TRIG_COUNT) { if (cmd->stop_src == TRIG_COUNT) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment