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

staging: comedi: ni_660x: use cfc_handle_events()

Use the comedi_fc helper function instead of duplicating the code.

In the Kconfig, COMEDI_NI_660X selects COMEDI_FC indirectly by selecting
COMEDI_NI_TIOCMD which selects COMEDI_MITE which selects COMEDI_FC.
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 2f1f7ea0
...@@ -40,6 +40,7 @@ ...@@ -40,6 +40,7 @@
#include "../comedidev.h" #include "../comedidev.h"
#include "comedi_fc.h"
#include "mite.h" #include "mite.h"
#include "ni_tio.h" #include "ni_tio.h"
...@@ -789,13 +790,7 @@ static void ni_660x_handle_gpct_interrupt(struct comedi_device *dev, ...@@ -789,13 +790,7 @@ static void ni_660x_handle_gpct_interrupt(struct comedi_device *dev,
struct ni_gpct *counter = s->private; struct ni_gpct *counter = s->private;
ni_tio_handle_interrupt(counter, s); ni_tio_handle_interrupt(counter, s);
if (s->async->events) { cfc_handle_events(dev, s);
if (s->async->events & (COMEDI_CB_EOA | COMEDI_CB_ERROR |
COMEDI_CB_OVERFLOW)) {
ni_660x_cancel(dev, s);
}
comedi_event(dev, s);
}
} }
static irqreturn_t ni_660x_interrupt(int irq, void *d) static irqreturn_t ni_660x_interrupt(int irq, void *d)
......
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