staging: comedi: ni_labpc_common: use comedi_buf_write_samples()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Wed, 22 Oct 2014 22:36:30 +0000 (15:36 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Oct 2014 08:03:11 +0000 (16:03 +0800)
Use comedi_buf_write_samples() instead of cfc_write_to_buffer() to add the
single sample to the async buffer.

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>
drivers/staging/comedi/drivers/ni_labpc_common.c

index 72dc78632cd54c61b80667af747890a8151109ec..685220369c32007c813a4c25aacd9007a31779e9 100644 (file)
@@ -818,7 +818,7 @@ static int labpc_drain_fifo(struct comedi_device *dev)
                        devpriv->count--;
                }
                data = labpc_read_adc_fifo(dev);
-               cfc_write_to_buffer(dev->read_subdev, data);
+               comedi_buf_write_samples(dev->read_subdev, &data, 1);
                devpriv->stat1 = devpriv->read_byte(dev, STAT1_REG);
        }
        if (i == timeout) {