summaryrefslogtreecommitdiff
path: root/drivers/staging/comedi/drivers/pcl816.c
diff options
context:
space:
mode:
authorH Hartley Sweeten <hsweeten@visionengravers.com>2014-03-07 17:31:39 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-03-17 13:55:56 -0700
commit61c3393f9374ae56108db0f6b60d3bd56780fe80 (patch)
tree01cffc264eaa0231b2c4cb9a11672b3d1e379b9f /drivers/staging/comedi/drivers/pcl816.c
parent8a8bd454417ed29f59492cf9ba30e555404e30d4 (diff)
staging: comedi: pcl816: 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_PCL816 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/pcl816.c')
-rw-r--r--drivers/staging/comedi/drivers/pcl816.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/staging/comedi/drivers/pcl816.c b/drivers/staging/comedi/drivers/pcl816.c
index 6386ef7a0042..6f276f23fabe 100644
--- a/drivers/staging/comedi/drivers/pcl816.c
+++ b/drivers/staging/comedi/drivers/pcl816.c
@@ -307,7 +307,6 @@ static bool pcl816_ai_next_chan(struct comedi_device *dev,
if (cmd->stop_src == TRIG_COUNT &&
devpriv->ai_act_scan >= cmd->stop_arg) {
/* all data sampled */
- s->cancel(dev, s);
s->async->events |= COMEDI_CB_EOA;
return false;
}
@@ -362,7 +361,7 @@ static irqreturn_t pcl816_interrupt(int irq, void *d)
pcl816_ai_clear_eoc(dev);
- comedi_event(dev, s);
+ cfc_handle_events(dev, s);
return IRQ_HANDLED;
}
@@ -520,7 +519,7 @@ static int pcl816_ai_poll(struct comedi_device *dev, struct comedi_subdevice *s)
devpriv->ai_poll_ptr = top1; /* new buffer position */
spin_unlock_irqrestore(&dev->spinlock, flags);
- comedi_event(dev, s);
+ cfc_handle_events(dev, s);
return s->async->buf_write_count - s->async->buf_read_count;
}