staging: comedi: ni_pcidio: use cfc_handle_events()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Sat, 8 Mar 2014 00:31:44 +0000 (17:31 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 17 Mar 2014 20:55:57 +0000 (13:55 -0700)
Use the comedi_fc helper function instead of duplicating the code.

In the Kconfig, COMEDI_NI_PCIDIO selects COMEDI_FC indirectly by
selecting 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>
drivers/staging/comedi/drivers/ni_pcidio.c

index 30c46a3..85ac2d9 100644 (file)
@@ -263,9 +263,6 @@ enum FPGA_Control_Bits {
 #define IntEn (TransferReady|CountExpired|Waited|PrimaryTC|SecondaryTC)
 #endif
 
-static int ni_pcidio_cancel(struct comedi_device *dev,
-                           struct comedi_subdevice *s);
-
 enum nidio_boardid {
        BOARD_PCIDIO_32HS,
        BOARD_PXI6533,
@@ -353,17 +350,6 @@ static void ni_pcidio_release_di_mite_channel(struct comedi_device *dev)
        spin_unlock_irqrestore(&devpriv->mite_channel_lock, flags);
 }
 
-static void ni_pcidio_event(struct comedi_device *dev,
-                           struct comedi_subdevice *s)
-{
-       if (s->
-           async->events & (COMEDI_CB_EOA | COMEDI_CB_ERROR |
-                            COMEDI_CB_OVERFLOW)) {
-               ni_pcidio_cancel(dev, s);
-       }
-       comedi_event(dev, s);
-}
-
 static int ni_pcidio_poll(struct comedi_device *dev, struct comedi_subdevice *s)
 {
        struct nidio96_private *devpriv = dev->private;
@@ -501,7 +487,7 @@ static irqreturn_t nidio_interrupt(int irq, void *d)
        }
 
 out:
-       ni_pcidio_event(dev, s);
+       cfc_handle_events(dev, s);
 #if 0
        if (!tag) {
                writeb(0x03,