Skip to content

Commit 562de49

Browse files
bigguinessgregkh
authored andcommitted
staging: comedi: ni_65xx: use comedi_buf_write_samples()
Use comedi_buf_write_samples() to add the sample to the async buffer. The async events COMEDI_CB_EOS will automatically be set by the core with the end-of-scan is detected. Remove the unnecessary event in 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 191db09 commit 562de49

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/staging/comedi/drivers/ni_65xx.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -508,9 +508,9 @@ static irqreturn_t ni_65xx_interrupt(int irq, void *d)
508508
writeb(NI_65XX_CLR_EDGE_INT | NI_65XX_CLR_OVERFLOW_INT,
509509
dev->mmio + NI_65XX_CLR_REG);
510510

511-
comedi_buf_put(s, 0);
512-
s->async->events |= COMEDI_CB_EOS;
511+
comedi_buf_write_samples(s, &s->state, 1);
513512
comedi_handle_events(dev, s);
513+
514514
return IRQ_HANDLED;
515515
}
516516

0 commit comments

Comments
 (0)