staging: comedi: ni_pcidio: use cfc_handle_events()
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>
This commit is contained in:
parent
3c5e6a62e3
commit
a4ccee260c
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue