Skip to content

Commit 9a84a7d

Browse files
bigguinessgregkh
authored andcommitted
staging: comedi: comedi_parport: 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 48e08de commit 9a84a7d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

drivers/staging/comedi/drivers/comedi_parport.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -225,10 +225,9 @@ static irqreturn_t parport_interrupt(int irq, void *d)
225225
if (!(ctrl & PARPORT_CTRL_IRQ_ENA))
226226
return IRQ_NONE;
227227

228-
comedi_buf_put(s, 0);
229-
s->async->events |= COMEDI_CB_BLOCK | COMEDI_CB_EOS;
230-
228+
comedi_buf_write_samples(s, &s->state, 1);
231229
comedi_handle_events(dev, s);
230+
232231
return IRQ_HANDLED;
233232
}
234233

0 commit comments

Comments
 (0)