diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2014-03-08 00:31:41 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-03-17 20:55:56 (GMT) |
commit | 199c3536dd38e7e3491534d418fb41e55dd613a4 (patch) | |
tree | 95dadba5bf6af88b473e4214666321f805c42595 /drivers | |
parent | 2f1f7ea0c5a8171583b93f880d4b988d83658a76 (diff) | |
download | linux-199c3536dd38e7e3491534d418fb41e55dd613a4.tar.xz |
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: 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')
-rw-r--r-- | drivers/staging/comedi/drivers/ni_660x.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/staging/comedi/drivers/ni_660x.c b/drivers/staging/comedi/drivers/ni_660x.c index b8c3fbe..0d4b901 100644 --- a/drivers/staging/comedi/drivers/ni_660x.c +++ b/drivers/staging/comedi/drivers/ni_660x.c @@ -40,6 +40,7 @@ #include "../comedidev.h" +#include "comedi_fc.h" #include "mite.h" #include "ni_tio.h" @@ -789,13 +790,7 @@ static void ni_660x_handle_gpct_interrupt(struct comedi_device *dev, struct ni_gpct *counter = s->private; ni_tio_handle_interrupt(counter, s); - if (s->async->events) { - if (s->async->events & (COMEDI_CB_EOA | COMEDI_CB_ERROR | - COMEDI_CB_OVERFLOW)) { - ni_660x_cancel(dev, s); - } - comedi_event(dev, s); - } + cfc_handle_events(dev, s); } static irqreturn_t ni_660x_interrupt(int irq, void *d) |