Commit a4a68fe2 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: quatech_daqp_cs: use comedi_buf_write_samples()

For aesthetics, use comedi_buf_write_samples() to add the sample to the
async buffer.

The core will add the COMEDI_CB_BLOCK event when data is written to the
async buffer. Remove the unnecessary event in the driver.
Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent edf4537b
...@@ -221,7 +221,7 @@ static enum irqreturn daqp_interrupt(int irq, void *dev_id) ...@@ -221,7 +221,7 @@ static enum irqreturn daqp_interrupt(int irq, void *dev_id)
data |= inb(dev->iobase + DAQP_FIFO) << 8; data |= inb(dev->iobase + DAQP_FIFO) << 8;
data ^= 0x8000; data ^= 0x8000;
comedi_buf_put(s, data); comedi_buf_write_samples(s, &data, 1);
/* If there's a limit, decrement it /* If there's a limit, decrement it
* and stop conversion if zero * and stop conversion if zero
...@@ -245,8 +245,6 @@ static enum irqreturn daqp_interrupt(int irq, void *dev_id) ...@@ -245,8 +245,6 @@ static enum irqreturn daqp_interrupt(int irq, void *dev_id)
s->async->events |= COMEDI_CB_EOA | COMEDI_CB_ERROR; s->async->events |= COMEDI_CB_EOA | COMEDI_CB_ERROR;
} }
s->async->events |= COMEDI_CB_BLOCK;
comedi_handle_events(dev, s); comedi_handle_events(dev, s);
} }
return IRQ_HANDLED; return IRQ_HANDLED;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment