Skip to content

Commit 191db09

Browse files
bigguinessgregkh
authored andcommitted
staging: comedi: ni_6527: 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 de88924 commit 191db09

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/staging/comedi/drivers/ni_6527.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,7 @@ static irqreturn_t ni6527_interrupt(int irq, void *d)
208208
return IRQ_NONE;
209209

210210
if (status & NI6527_STATUS_EDGE) {
211-
comedi_buf_put(s, 0);
212-
s->async->events |= COMEDI_CB_EOS;
211+
comedi_buf_write_samples(s, &s->state, 1);
213212
comedi_handle_events(dev, s);
214213
}
215214

0 commit comments

Comments
 (0)