Skip to content

Commit 6bb45f2

Browse files
bigguinessgregkh
authored andcommitted
staging: comedi: addi_apci_1032: use comedi_buf_write_samples()
Use comedi_buf_write_samples() to add the sample to the async buffer. The async events COMEDI_CB_BLOCK and COMEDI_CB_EOS will be detected and set by the core. Remove the unnecessary events 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 f4add8d commit 6bb45f2

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/staging/comedi/drivers/addi_apci_1032.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,8 +258,7 @@ static irqreturn_t apci1032_interrupt(int irq, void *d)
258258
outl(ctrl & ~APCI1032_CTRL_INT_ENA, dev->iobase + APCI1032_CTRL_REG);
259259

260260
s->state = inl(dev->iobase + APCI1032_STATUS_REG) & 0xffff;
261-
comedi_buf_put(s, s->state);
262-
s->async->events |= COMEDI_CB_BLOCK | COMEDI_CB_EOS;
261+
comedi_buf_write_samples(s, &s->state, 1);
263262
comedi_handle_events(dev, s);
264263

265264
/* enable the interrupt */

0 commit comments

Comments
 (0)