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

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

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: 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 a4a68fe2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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 */