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

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

staging: comedi: hwdrv_apci3120: use comedi_buf_write_samples()



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: 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 9fdfe0fd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1172,7 +1172,7 @@ static void v_APCI3120_InterruptDmaMoveBlock16bit(struct comedi_device *dev,
	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);
}

/*