Skip to content

Commit ad9eb43

Browse files
bigguinessgregkh
authored andcommitted
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 <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 88f9662 commit ad9eb43

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

drivers/staging/comedi/drivers/das800.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -511,12 +511,11 @@ static irqreturn_t das800_interrupt(int irq, void *d)
511511

512512
/* if there are more data points to collect */
513513
if (cmd->stop_src == TRIG_NONE || devpriv->count > 0) {
514-
/* write data point to buffer */
515-
cfc_write_to_buffer(s, val & s->maxdata);
514+
val &= s->maxdata;
515+
comedi_buf_write_samples(s, &val, 1);
516516
devpriv->count--;
517517
}
518518
}
519-
async->events |= COMEDI_CB_BLOCK;
520519

521520
if (fifo_overflow) {
522521
spin_unlock_irqrestore(&dev->spinlock, irq_flags);

0 commit comments

Comments
 (0)