summaryrefslogtreecommitdiff
path: root/drivers/staging/comedi/drivers/adl_pci9111.c
diff options
context:
space:
mode:
authorH Hartley Sweeten <hsweeten@visionengravers.com>2014-10-22 15:36:38 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-10-29 16:03:11 +0800
commit9fdfe0fd009b261aa51c0226ca261ab039feaf62 (patch)
tree50c51ee0f7e3c789a5c4073988eb67b65d5bb3ad /drivers/staging/comedi/drivers/adl_pci9111.c
parentbe591d5c42cdc25cfe8a586082a7e0e3ef0223b1 (diff)
staging: comedi: adl_pci9111: 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: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/comedi/drivers/adl_pci9111.c')
-rw-r--r--drivers/staging/comedi/drivers/adl_pci9111.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/staging/comedi/drivers/adl_pci9111.c b/drivers/staging/comedi/drivers/adl_pci9111.c
index 076866e121a0..18f5f7fc1bc8 100644
--- a/drivers/staging/comedi/drivers/adl_pci9111.c
+++ b/drivers/staging/comedi/drivers/adl_pci9111.c
@@ -477,9 +477,8 @@ static void pci9111_handle_fifo_half_full(struct comedi_device *dev,
devpriv->ai_bounce_buffer, samples);
if (devpriv->scan_delay < 1) {
- total = cfc_write_array_to_buffer(s,
- devpriv->ai_bounce_buffer,
- samples * sizeof(short));
+ total = comedi_buf_write_samples(s, devpriv->ai_bounce_buffer,
+ samples);
} else {
unsigned int pos = 0;
unsigned int to_read;
@@ -492,9 +491,9 @@ static void pci9111_handle_fifo_half_full(struct comedi_device *dev,
if (to_read > samples - pos)
to_read = samples - pos;
- total += cfc_write_array_to_buffer(s,
+ total += comedi_buf_write_samples(s,
devpriv->ai_bounce_buffer + pos,
- to_read * sizeof(short));
+ to_read);
} else {
to_read = devpriv->chunk_num_samples -
devpriv->chunk_counter;