staging: comedi: rtd520: use comedi_buf_write_samples()
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>
This commit is contained in:
parent
a4a68fe2a2
commit
5023a4bb10
@ -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 */
|
||||
|
Loading…
x
Reference in New Issue
Block a user