From: H Hartley Sweeten Date: Wed, 22 Oct 2014 22:37:06 +0000 (-0700) Subject: staging: comedi: rtd520: use comedi_buf_write_samples() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=5023a4bb10f5372a8a9d2429d1dcb32b4ed79b80;p=openwrt%2Fstaging%2Fblogic.git 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 Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/rtd520.c b/drivers/staging/comedi/drivers/rtd520.c index 1a62e8f249ae..888238e26073 100644 --- a/drivers/staging/comedi/drivers/rtd520.c +++ b/drivers/staging/comedi/drivers/rtd520.c @@ -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 */