Skip to content

Commit c4a58f2

Browse files
bigguinessgregkh
authored andcommitted
staging: comedi: addi_apci_1564: 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 6bb45f2 commit c4a58f2

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/staging/comedi/drivers/addi_apci_1564.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,7 @@ static irqreturn_t apci1564_interrupt(int irq, void *d)
9595

9696
s->state = inl(dev->iobase + APCI1564_DI_INT_STATUS_REG)
9797
& 0xffff;
98-
comedi_buf_put(s, s->state);
99-
s->async->events |= COMEDI_CB_BLOCK | COMEDI_CB_EOS;
98+
comedi_buf_write_samples(s, &s->state, 1);
10099
comedi_handle_events(dev, s);
101100

102101
/* enable the interrupt */

0 commit comments

Comments
 (0)