Skip to content

Commit

Permalink
staging: comedi: comedi_parport: use comedi_buf_write_samples()
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
bigguiness authored and gregkh committed Oct 29, 2014
1 parent 48e08de commit 9a84a7d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/staging/comedi/drivers/comedi_parport.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,10 +225,9 @@ static irqreturn_t parport_interrupt(int irq, void *d)
if (!(ctrl & PARPORT_CTRL_IRQ_ENA))
return IRQ_NONE;

comedi_buf_put(s, 0);
s->async->events |= COMEDI_CB_BLOCK | COMEDI_CB_EOS;

comedi_buf_write_samples(s, &s->state, 1);
comedi_handle_events(dev, s);

return IRQ_HANDLED;
}

Expand Down

0 comments on commit 9a84a7d

Please sign in to comment.