Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -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) {