aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/comedi/drivers/pcl818.c
diff options
context:
space:
mode:
authorH Hartley Sweeten <hsweeten@visionengravers.com>2014-03-07 17:31:40 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-03-17 13:55:56 -0700
commit2f1f7ea0c5a8171583b93f880d4b988d83658a76 (patch)
tree49ad6a172c01e0ef060d9363d9ee80b8d407fdcf /drivers/staging/comedi/drivers/pcl818.c
parentstaging: comedi: pcl816: use cfc_handle_events() (diff)
downloadlinux-dev-2f1f7ea0c5a8171583b93f880d4b988d83658a76.tar.xz
linux-dev-2f1f7ea0c5a8171583b93f880d4b988d83658a76.zip
staging: comedi: pcl818: use cfc_handle_events()
Use the comedi_fc helper function to automatically call the subdevice (*cancel) function when needed and call comedi_event(). Update the Kconfig so that COMEDI_PCL818 selects COMEDI_FC. 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/pcl818.c')
-rw-r--r--drivers/staging/comedi/drivers/pcl818.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/staging/comedi/drivers/pcl818.c b/drivers/staging/comedi/drivers/pcl818.c
index d4d5c384aa1b..6463476ce45a 100644
--- a/drivers/staging/comedi/drivers/pcl818.c
+++ b/drivers/staging/comedi/drivers/pcl818.c
@@ -510,7 +510,6 @@ static bool pcl818_ai_dropout(struct comedi_device *dev,
(devpriv->dma) ? "DMA" :
(devpriv->usefifo) ? "FIFO" : "IRQ",
chan, expected_chan);
- s->cancel(dev, s);
s->async->events |= COMEDI_CB_EOA | COMEDI_CB_ERROR;
return true;
}
@@ -538,7 +537,6 @@ static bool pcl818_ai_next_chan(struct comedi_device *dev,
if (cmd->stop_src == TRIG_COUNT && devpriv->ai_act_scan == 0) {
/* all data sampled */
- s->cancel(dev, s);
s->async->events |= COMEDI_CB_EOA;
return false;
}
@@ -554,7 +552,6 @@ static void pcl818_handle_eoc(struct comedi_device *dev,
if (pcl818_ai_eoc(dev, s, NULL, 0)) {
comedi_error(dev, "A/D mode1/3 IRQ without DRDY!");
- s->cancel(dev, s);
s->async->events |= COMEDI_CB_EOA | COMEDI_CB_ERROR;
return;
}
@@ -612,14 +609,12 @@ static void pcl818_handle_fifo(struct comedi_device *dev,
if (status & 4) {
comedi_error(dev, "A/D mode1/3 FIFO overflow!");
- s->cancel(dev, s);
s->async->events |= COMEDI_CB_EOA | COMEDI_CB_ERROR;
return;
}
if (status & 1) {
comedi_error(dev, "A/D mode1/3 FIFO interrupt without data!");
- s->cancel(dev, s);
s->async->events |= COMEDI_CB_EOA | COMEDI_CB_ERROR;
return;
}
@@ -674,7 +669,7 @@ static irqreturn_t pcl818_interrupt(int irq, void *d)
pcl818_ai_clear_eoc(dev);
- comedi_event(dev, s);
+ cfc_handle_events(dev, s);
return IRQ_HANDLED;
}