summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH Hartley Sweeten <hsweeten@visionengravers.com>2014-10-22 15:37:05 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-10-29 16:03:14 +0800
commita4a68fe2a264778d1452b64964ebf65670ef774d (patch)
treedc5207cd7779a2d46ae7ca7e62e417fa8305780a
parentedf4537bcbf53bb6297678431da12b766fe16610 (diff)
downloadop-kernel-dev-a4a68fe2a264778d1452b64964ebf65670ef774d.zip
op-kernel-dev-a4a68fe2a264778d1452b64964ebf65670ef774d.tar.gz
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: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/comedi/drivers/quatech_daqp_cs.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/staging/comedi/drivers/quatech_daqp_cs.c b/drivers/staging/comedi/drivers/quatech_daqp_cs.c
index 21e99fd..f6c678e 100644
--- a/drivers/staging/comedi/drivers/quatech_daqp_cs.c
+++ b/drivers/staging/comedi/drivers/quatech_daqp_cs.c
@@ -221,7 +221,7 @@ static enum irqreturn daqp_interrupt(int irq, void *dev_id)
data |= inb(dev->iobase + DAQP_FIFO) << 8;
data ^= 0x8000;
- comedi_buf_put(s, data);
+ comedi_buf_write_samples(s, &data, 1);
/* If there's a limit, decrement it
* and stop conversion if zero
@@ -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_BLOCK;
-
comedi_handle_events(dev, s);
}
return IRQ_HANDLED;
OpenPOWER on IntegriCloud