summaryrefslogtreecommitdiffstats
path: root/drivers/staging/comedi/drivers/dt3000.c
diff options
context:
space:
mode:
authorH Hartley Sweeten2014-10-23 00:36:55 +0200
committerGreg Kroah-Hartman2014-10-29 09:03:13 +0100
commitaa96f6ef6f8672c6fabd461f6259af73d7f515c6 (patch)
treeccd7ca83ea2eb78a6968002d512f342e804f4ab4 /drivers/staging/comedi/drivers/dt3000.c
parentstaging: comedi: dmm32at: use comedi_buf_write_samples() (diff)
downloadkernel-qcow2-linux-aa96f6ef6f8672c6fabd461f6259af73d7f515c6.tar.gz
kernel-qcow2-linux-aa96f6ef6f8672c6fabd461f6259af73d7f515c6.tar.xz
kernel-qcow2-linux-aa96f6ef6f8672c6fabd461f6259af73d7f515c6.zip
staging: comedi: dt3000: use comedi_buf_write_samples()
For aesthetics, use comedi_buf_write_samples() to add the sample to the async buffer. The core will set the COMEDi_CB_BLOCK event when data is written to the async buffer. Remove the unnecessary event from 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>
Diffstat (limited to 'drivers/staging/comedi/drivers/dt3000.c')
-rw-r--r--drivers/staging/comedi/drivers/dt3000.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/staging/comedi/drivers/dt3000.c b/drivers/staging/comedi/drivers/dt3000.c
index 6544f4482740..c2058ba39fa1 100644
--- a/drivers/staging/comedi/drivers/dt3000.c
+++ b/drivers/staging/comedi/drivers/dt3000.c
@@ -315,7 +315,7 @@ static void dt3k_ai_empty_fifo(struct comedi_device *dev,
for (i = 0; i < count; i++) {
data = readw(dev->mmio + DPR_ADC_buffer + rear);
- comedi_buf_put(s, data);
+ comedi_buf_write_samples(s, &data, 1);
rear++;
if (rear >= AI_FIFO_DEPTH)
rear = 0;
@@ -351,10 +351,8 @@ static irqreturn_t dt3k_interrupt(int irq, void *d)
status = readw(dev->mmio + DPR_Intr_Flag);
- if (status & DT3000_ADFULL) {
+ if (status & DT3000_ADFULL)
dt3k_ai_empty_fifo(dev, s);
- s->async->events |= COMEDI_CB_BLOCK;
- }
if (status & (DT3000_ADSWERR | DT3000_ADHWERR))
s->async->events |= COMEDI_CB_ERROR | COMEDI_CB_EOA;