if (irq>0)
{
- if (comedi_request_irq(irq, v_ADDI_Interrupt, SA_SHIRQ, c_Identifier, dev) < 0)
+ if (comedi_request_irq(irq, v_ADDI_Interrupt, IRQF_SHARED, c_Identifier, dev) < 0)
{
printk(", unable to allocate IRQ %d, DISABLING IT", irq);
irq=0; /* Can't use IRQ */
{
if (comedi_request_irq (pci_device->irq,
pci9111_interrupt,
- SA_SHIRQ,
+ IRQF_SHARED,
PCI9111_DRIVER_NAME,
dev)!=0)
{
if (it->options[3]&2) irq=0; // user don't want use IRQ
if (irq>0) {
- if (comedi_request_irq(irq, interrupt_pci9118, SA_SHIRQ, "ADLink PCI-9118", dev)) {
+ if (comedi_request_irq(irq, interrupt_pci9118, IRQF_SHARED, "ADLink PCI-9118", dev)) {
rt_printk(", unable to allocate IRQ %d, DISABLING IT", irq);
irq=0; /* Can't use IRQ */
} else {
if (this_board->have_irq) {
if (irq) {
- if (comedi_request_irq(irq, interrupt_service_pci1710, SA_SHIRQ, "Advantech PCI-1710", dev)) {
+ if (comedi_request_irq(irq, interrupt_service_pci1710, IRQF_SHARED, "Advantech PCI-1710", dev)) {
rt_printk(", unable to allocate IRQ %d, DISABLING IT", irq);
irq=0; /* Can't use IRQ */
} else {
dev->board_name = thisboard->name;
if (irq) {
- unsigned long flags = share_irq ? SA_SHIRQ : 0;
+ unsigned long flags = share_irq ? IRQF_SHARED : 0;
if (comedi_request_irq(irq, dio200_interrupt, flags,
DIO200_DRIVER_NAME, dev) >= 0) {
s->type = COMEDI_SUBD_UNUSED;
pc236_intr_disable(dev);
if (irq) {
- unsigned long flags = share_irq ? SA_SHIRQ : 0;
+ unsigned long flags = share_irq ? IRQF_SHARED : 0;
if (comedi_request_irq(irq, pc236_interrupt, flags,
PC236_DRIVER_NAME, dev) >= 0) {
dev->board_name = thisboard->name;
if (irq) {
- ret = comedi_request_irq(irq, pci224_interrupt, SA_SHIRQ,
+ ret = comedi_request_irq(irq, pci224_interrupt, IRQF_SHARED,
DRIVER_NAME, dev);
if (ret < 0) {
printk(KERN_ERR "comedi%d: error! "
outb(0, devpriv->pci_iobase + PCI230_INT_SCE);
/* Register the interrupt handler. */
- irq_hdl = comedi_request_irq(devpriv->pci_dev->irq, pci230_interrupt, SA_SHIRQ, "amplc_pci230", dev);
+ irq_hdl = comedi_request_irq(devpriv->pci_dev->irq, pci230_interrupt, IRQF_SHARED, "amplc_pci230", dev);
if(irq_hdl<0) {
printk("comedi%d: amplc_pci230: unable to register irq, commands will not be available %d\n", dev->minor, devpriv->pci_dev->irq);
}
printk("\n");
ret = comedi_request_irq(link->irq.AssignedIRQ, das16cs_interrupt,
- SA_SHIRQ, "cb_das16_cs", dev);
+ IRQF_SHARED, "cb_das16_cs", dev);
if(ret<0){
return ret;
}
}
// get irq
- if(comedi_request_irq(devpriv->pci_dev->irq, cb_pcidas_interrupt, SA_SHIRQ, "cb_pcidas", dev ))
+ if(comedi_request_irq(devpriv->pci_dev->irq, cb_pcidas_interrupt, IRQF_SHARED, "cb_pcidas", dev ))
{
printk(" unable to allocate irq %d\n", devpriv->pci_dev->irq);
return -EINVAL;
priv(dev)->hw_revision = hw_revision( dev, readw(priv(dev)->main_iobase + HW_STATUS_REG ) );
printk(" stc hardware revision %i\n", priv(dev)->hw_revision);
// get irq
- if(comedi_request_irq(pcidev->irq, handle_interrupt, SA_SHIRQ, "cb_pcidas64", dev ))
+ if(comedi_request_irq(pcidev->irq, handle_interrupt, IRQF_SHARED, "cb_pcidas64", dev ))
{
printk(" unable to allocate irq %u\n", pcidev->irq);
return -EINVAL;
// Dont support IRQ yet
// // get irq
-// if(comedi_request_irq(devpriv->pci_dev->irq, cb_pcimdas_interrupt, SA_SHIRQ, "cb_pcimdas", dev ))
+// if(comedi_request_irq(devpriv->pci_dev->irq, cb_pcimdas_interrupt, IRQF_SHARED, "cb_pcimdas", dev ))
// {
// printk(" unable to allocate irq %u\n", devpriv->pci_dev->irq);
// return -EINVAL;
dev->board_name = this_board->name;
if(comedi_request_irq(devpriv->pci_dev->irq, dt3k_interrupt,
- SA_SHIRQ, "dt3000", dev)){
+ IRQF_SHARED, "dt3000", dev)){
printk(" unable to allocate IRQ %u\n", devpriv->pci_dev->irq);
return -EINVAL;
}
DEBUG_PRINT(" hpdi remapped to 0x%p\n", priv(dev)->hpdi_iobase);
// get irq
- if( comedi_request_irq( pcidev->irq, handle_interrupt, SA_SHIRQ, driver_hpdi.driver_name,
+ if( comedi_request_irq( pcidev->irq, handle_interrupt, IRQF_SHARED, driver_hpdi.driver_name,
dev ) )
{
printk( " unable to allocate irq %u\n", pcidev->irq );
if (this_board->have_irq) {
if (irq) {
- if (comedi_request_irq(irq, interrupt_service_icp_multi, SA_SHIRQ, "Inova Icp Multi", dev)) {
+ if (comedi_request_irq(irq, interrupt_service_icp_multi, IRQF_SHARED, "Inova Icp Multi", dev)) {
printk(", unable to allocate IRQ %u, DISABLING IT", irq);
irq=0; /* Can't use IRQ */
}
s->insn_read = me4000_ai_insn_read;
if(info->irq > 0){
- if(comedi_request_irq(info->irq, me4000_ai_isr, SA_SHIRQ, "ME-4000", dev)) {
+ if(comedi_request_irq(info->irq, me4000_ai_isr, IRQF_SHARED, "ME-4000", dev)) {
printk("comedi%d: me4000: me4000_attach(): Unable to allocate irq\n", dev->minor);
}
else{
devpriv->mite->daq_io_addr + Clear_Register);
writeb(0x00, devpriv->mite->daq_io_addr + Master_Interrupt_Control);
- ret = comedi_request_irq(mite_irq(devpriv->mite), ni6527_interrupt, SA_SHIRQ, "ni6527", dev);
+ ret = comedi_request_irq(mite_irq(devpriv->mite), ni6527_interrupt, IRQF_SHARED, "ni6527", dev);
if(ret<0){
printk(" irq not available");
}else
/* Set filter interval to 0 (32bit reg) */
writeb(0x00000000, private(dev)->mite->daq_io_addr + Filter_Interval);
- ret=comedi_request_irq(dev->irq,ni_65xx_interrupt,SA_SHIRQ,"ni_65xx",dev);
+ ret=comedi_request_irq(dev->irq,ni_65xx_interrupt,IRQF_SHARED,"ni_65xx",dev);
if(ret<0){
dev->irq=0;
printk(" irq not available");
{
isr_flags = 0;
if(thisboard->bustype == pci_bustype)
- isr_flags |= SA_SHIRQ;
+ isr_flags |= IRQF_SHARED;
if(comedi_request_irq( irq, labpc_interrupt, isr_flags, driver_labpc.driver_name, dev))
{
printk( "unable to allocate irq %u\n", irq);
#define IRQ_POLARITY 1
-#define NI_E_IRQ_FLAGS SA_SHIRQ
+#define NI_E_IRQ_FLAGS IRQF_SHARED
typedef struct{
dev_link_t *link;
/* disable interrupts on board */
writeb(0x00,devpriv->mite->daq_io_addr+Master_DMA_And_Interrupt_Control);
- ret=comedi_request_irq(irq,nidio_interrupt,SA_SHIRQ,"ni_pcidio",dev);
+ ret=comedi_request_irq(irq,nidio_interrupt,IRQF_SHARED,"ni_pcidio",dev);
if(ret<0){
printk(" irq not available");
}
#define interrupt_pin(a) 0
#define IRQ_POLARITY 1
-#define NI_E_IRQ_FLAGS SA_SHIRQ
+#define NI_E_IRQ_FLAGS IRQF_SHARED
#include "ni_mio_common.c"
init_asics(dev); /* clear out all the registers, basically */
for (asic = 0; irq[0] && asic < MAX_ASICS; ++asic) {
- if (irq[asic] && comedi_request_irq(irq[asic], interrupt_pcmmio, SA_SHIRQ, thisboard->name, dev)) {
+ if (irq[asic] && comedi_request_irq(irq[asic], interrupt_pcmmio, IRQF_SHARED, thisboard->name, dev)) {
int i;
/* unroll the allocated irqs.. */
for (i = asic-1; i >= 0; --i) {
init_asics(dev); /* clear out all the registers, basically */
for (asic = 0; irq[0] && asic < MAX_ASICS; ++asic) {
- if (irq[asic] && comedi_request_irq(irq[asic], interrupt_pcmuio, SA_SHIRQ, thisboard->name, dev)) {
+ if (irq[asic] && comedi_request_irq(irq[asic], interrupt_pcmuio, IRQF_SHARED, thisboard->name, dev)) {
int i;
/* unroll the allocated irqs.. */
for (i = asic-1; i >= 0; --i) {
/* check if our interrupt is available and get it */
if((ret=comedi_request_irq (devpriv->pci_dev->irq, rtd_interrupt,
- SA_SHIRQ, "rtd520", dev)) < 0) {
+ IRQF_SHARED, "rtd520", dev)) < 0) {
printk("Could not get interrupt! (%u)\n", devpriv->pci_dev->irq);
return ret;
}
if(dev->irq==0){
printk(" unknown irq (bad)\n");
}else{
- if( (ret=comedi_request_irq(dev->irq,s626_irq_handler,SA_SHIRQ,"s626",dev))<0 ){
+ if( (ret=comedi_request_irq(dev->irq,s626_irq_handler,IRQF_SHARED,"s626",dev))<0 ){
printk(" irq not available\n");
dev->irq=0;
}
/* null shared interrupt flag, since rt interrupt handlers do not
* support it, and this version of comedi_request_irq() is only
* called for kernels with rt support */
- unsigned long unshared_flags = flags & ~SA_SHIRQ;
+ unsigned long unshared_flags = flags & ~IRQF_SHARED;
ret = request_irq(irq, handler, unshared_flags, device, dev_id);
if(ret<0){
// we failed, so fall back on allowing shared interrupt (which we won't ever make RT)
- if(flags & SA_SHIRQ)
+ if(flags & IRQF_SHARED)
{
rt_printk("comedi: cannot get unshared interrupt, will not use RT interrupts.\n");
ret=request_irq(irq, handler, flags, device, dev_id);
#ifndef __COMPAT_LINUX_INTERRUPT_H_
#define __COMPAT_LINUX_INTERRUPT_H_
+#include_next <linux/interrupt.h>
+
#include <linux/version.h>
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 4, 23)
+#ifndef IRQ_NONE
typedef void irqreturn_t;
#define IRQ_NONE
#define IRQ_HANDLED
#define IRQ_RETVAL(x) (void)(x)
#endif
+#ifndef IRQF_DISABLED
+#define IRQF_DISABLED SA_INTERRUPT
+#define IRQF_SAMPLE_RANDOM SA_SAMPLE_RANDOM
+#define IRQF_SHARED SA_SHIRQ
+#define IRQF_PROBE_SHARED SA_PROBEIRQ
+#define IRQF_PERCPU SA_PERCPU
+#ifdef SA_TRIGGER_MASK
+#define IRQF_TRIGGER_NONE 0
+#define IRQF_TRIGGER_LOW SA_TRIGGER_LOW
+#define IRQF_TRIGGER_HIGH SA_TRIGGER_HIGH
+#define IRQF_TRIGGER_FALLING SA_TRIGGER_FALLING
+#define IRQF_TRIGGER_RISING SA_TRIGGER_RISING
+#define IRQF_TRIGGER_MASK SA_TRIGGER_MASK
+#else
+#define IRQF_TRIGGER_NONE 0
+#define IRQF_TRIGGER_LOW 0
+#define IRQF_TRIGGER_HIGH 0
+#define IRQF_TRIGGER_FALLING 0
+#define IRQF_TRIGGER_RISING 0
+#define IRQF_TRIGGER_MASK 0
+#endif
+#endif
+
/* if interrupt handler prototype has pt_regs* parameter */
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19)
#define PT_REGS_ARG , struct pt_regs *regs
#define PT_REGS_ARG
#endif
-#include_next <linux/interrupt.h>
-
#endif