diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2014-10-22 15:36:27 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-10-29 16:03:10 +0800 |
commit | ad9eb43c93d83578674e1da78a0bd792c3a22513 (patch) | |
tree | 9592baf3a32c89d2d38251050c499cd67ab2a089 | |
parent | 88f9662abbedb43ecf9ec4e03ab67500bbf66d7d (diff) | |
download | op-kernel-dev-ad9eb43c93d83578674e1da78a0bd792c3a22513.zip op-kernel-dev-ad9eb43c93d83578674e1da78a0bd792c3a22513.tar.gz |
staging: comedi: das800: use comedi_buf_write_samples()
Use comedi_buf_write_samples() instead of cfc_write_to_buffer() to add the
single sample to the async buffer.
The core will add the COMEDI_CB_BLOCK event when data is written to the
async buffer. Remove the unnecessary event from the driver.
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>
-rw-r--r-- | drivers/staging/comedi/drivers/das800.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/staging/comedi/drivers/das800.c b/drivers/staging/comedi/drivers/das800.c index e284d20..6013099 100644 --- a/drivers/staging/comedi/drivers/das800.c +++ b/drivers/staging/comedi/drivers/das800.c @@ -511,12 +511,11 @@ static irqreturn_t das800_interrupt(int irq, void *d) /* if there are more data points to collect */ if (cmd->stop_src == TRIG_NONE || devpriv->count > 0) { - /* write data point to buffer */ - cfc_write_to_buffer(s, val & s->maxdata); + val &= s->maxdata; + comedi_buf_write_samples(s, &val, 1); devpriv->count--; } } - async->events |= COMEDI_CB_BLOCK; if (fifo_overflow) { spin_unlock_irqrestore(&dev->spinlock, irq_flags); |