Pass the 'interrupt_pin' to ni_E_init() and remove the macros.
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>
-1, -1, -1, 0, 1, 2, -1, 3, -1, -1, 4, 5, 6, -1, -1, 7
};
-#define interrupt_pin(a) (ni_irqpin[(a)])
-
#define IRQ_POLARITY 0
#define NI_E_IRQ_FLAGS 0
/* generic E series stuff in ni_mio_common.c */
- ret = ni_E_init(dev);
+ ret = ni_E_init(dev, ni_irqpin[dev->irq]);
if (ret < 0)
return ret;
return 0;
}
-static int ni_E_init(struct comedi_device *dev)
+static int ni_E_init(struct comedi_device *dev, unsigned interrupt_pin)
{
const struct ni_board_struct *board = comedi_board(dev);
struct ni_private *devpriv = dev->private;
(IRQ_POLARITY ? Interrupt_Output_Polarity : 0) |
(Interrupt_Output_On_3_Pins & 0) |
Interrupt_A_Enable | Interrupt_B_Enable |
- Interrupt_A_Output_Select(interrupt_pin(dev->irq)) |
- Interrupt_B_Output_Select(interrupt_pin(dev->irq)),
+ Interrupt_A_Output_Select(interrupt_pin) |
+ Interrupt_B_Output_Select(interrupt_pin),
Interrupt_Control_Register);
}
#endif
};
-#define interrupt_pin(a) 0
-
#define IRQ_POLARITY 1
#include "ni_mio_common.c"
devpriv = dev->private;
- return ni_E_init(dev);
+ return ni_E_init(dev, 0);
}
static void mio_cs_detach(struct comedi_device *dev)
},
};
-#define interrupt_pin(a) 0
#define IRQ_POLARITY 1
#define NI_E_IRQ_FLAGS IRQF_SHARED
dev->irq = irq;
}
- ret = ni_E_init(dev);
+ ret = ni_E_init(dev, 0);
if (ret < 0)
return ret;