staging: comedi: rtd520: use comedi_buf_write_samples()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Wed, 22 Oct 2014 22:37:06 +0000 (15:37 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Oct 2014 08:03:14 +0000 (16:03 +0800)
For aesthetics, use comedi_buf_write_samples() to add the 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/rtd520.c

index 1a62e8f249ae51731fce5c4608e2bb4841788179..888238e26073f9a3edcc8fbfda4793051ea9b24d 100644 (file)
@@ -623,7 +623,7 @@ static int ai_read_n(struct comedi_device *dev, struct comedi_subdevice *s,
                        d = comedi_offset_munge(s, d);
                d &= s->maxdata;
 
-               if (!comedi_buf_put(s, d))
+               if (!comedi_buf_write_samples(s, &d, 1))
                        return -1;
 
                if (devpriv->ai_count > 0)      /* < 0, means read forever */