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 <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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);
}
/*