Update deprecated interrupt flags (SA_SHIRQ => IRQF_SHARED).
authorIan Abbott <abbotti@mev.co.uk>
Wed, 27 Jun 2007 10:23:44 +0000 (10:23 +0000)
committerIan Abbott <abbotti@mev.co.uk>
Wed, 27 Jun 2007 10:23:44 +0000 (10:23 +0000)
28 files changed:
comedi/drivers/addi-data/addi_common.c
comedi/drivers/adl_pci9111.c
comedi/drivers/adl_pci9118.c
comedi/drivers/adv_pci1710.c
comedi/drivers/amplc_dio200.c
comedi/drivers/amplc_pc236.c
comedi/drivers/amplc_pci224.c
comedi/drivers/amplc_pci230.c
comedi/drivers/cb_das16_cs.c
comedi/drivers/cb_pcidas.c
comedi/drivers/cb_pcidas64.c
comedi/drivers/cb_pcimdas.c
comedi/drivers/dt3000.c
comedi/drivers/gsc_hpdi.c
comedi/drivers/icp_multi.c
comedi/drivers/me4000.c
comedi/drivers/ni_6527.c
comedi/drivers/ni_65xx.c
comedi/drivers/ni_labpc.c
comedi/drivers/ni_mio_cs.c
comedi/drivers/ni_pcidio.c
comedi/drivers/ni_pcimio.c
comedi/drivers/pcmmio.c
comedi/drivers/pcmuio.c
comedi/drivers/rtd520.c
comedi/drivers/s626.c
comedi/rt.c
include/linux/interrupt.h

index 7b83d7ad4da4d61d3f11088e916d643e1437bdd4..b087d4c0e5ce756c4c74ca1e3cb9df8e92125697 100644 (file)
@@ -2614,7 +2614,7 @@ static int i_ADDI_Attach(comedi_device *dev,comedi_devconfig *it)
 
        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 */
index d5ef00906318d55087ec4718076152b9b5423114..97695d8466fa303ba06bdd35b108bd548a84240d 100644 (file)
@@ -1364,7 +1364,7 @@ found:
        {
                if (comedi_request_irq (pci_device->irq,
                        pci9111_interrupt,
-                       SA_SHIRQ,
+                       IRQF_SHARED,
                        PCI9111_DRIVER_NAME,
                        dev)!=0)
                {
index 6cef0cf344670fbca383234cff651a8a050884a1..ba8b380a50f9a3114d80f534f18e5b16a0031dde 100644 (file)
@@ -1751,7 +1751,7 @@ static int pci9118_attach(comedi_device *dev,comedi_devconfig *it)
 
        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 {
index eb4261d40018c6b08baf35f3fa2a2bbb60b5f163..731e0490445aca638a8078a6ee74a068fac0085c 100644 (file)
@@ -1301,7 +1301,7 @@ static int pci1710_attach(comedi_device *dev,comedi_devconfig *it)
 
        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 {
index 509b1071576e72455d344160e016a4e5a8e5e915..a9a7d9174e34f78e46b9a8d9e30122531a35a2e4 100644 (file)
@@ -1306,7 +1306,7 @@ dio200_attach(comedi_device *dev,comedi_devconfig *it)
        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) {
index 41618e67f4359592e8497e3af8f717858b57eada..30e9c05cff0bc3859335431d28e4d909132e38c6 100644 (file)
@@ -287,7 +287,7 @@ static int pc236_attach(comedi_device *dev,comedi_devconfig *it)
        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) {
index c815e305d6d8ee691b1dbf9de5286cc189084fb3..76b68f33483836db84fc03362beec723cfd23274 100644 (file)
@@ -1474,7 +1474,7 @@ pci224_attach(comedi_device *dev,comedi_devconfig *it)
        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! "
index 68c2e815aaef66b58a4d70e72acd806f6c5d9f0b..5e26cd238402bf609e8f96a4ccda36ba5cb4b11d 100644 (file)
@@ -390,7 +390,7 @@ static int pci230_attach(comedi_device *dev,comedi_devconfig *it)
        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);
        }
index 52d007b806be1ee627013f1d3c708c84c03ae612..f70624c5cc132bed09db86bec23ae22bec9c31e8 100644 (file)
@@ -182,7 +182,7 @@ static int das16cs_attach(comedi_device *dev,comedi_devconfig *it)
        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;
        }
index 8615b8d7bb64ddf8e2a9e85e5893215a60138b4f..d0e7ba4e830538cb091b4430d6d5b5cef7399c8e 100644 (file)
@@ -585,7 +585,7 @@ found:
        }
 
        // 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;
index 9a51be3829409a01b206539286345009b9c7550d..5d02a75a9dbf0caab1e5df881d02cf821ec99a55 100644 (file)
@@ -1750,7 +1750,7 @@ static int attach(comedi_device *dev, comedi_devconfig *it)
        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;
index e9b3b75f9b10750e5304fefe840e7722993ee879..4393bc393c7b5d599683ac81b2db0c6909b73705 100644 (file)
@@ -288,7 +288,7 @@ found:
 
 // 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;
index f65fd95e5ddebb134ed81b91df46fa0594796a27..569c186184bc85426e445ac80dc3cb4e11a9bc76 100644 (file)
@@ -784,7 +784,7 @@ static int dt3000_attach(comedi_device *dev,comedi_devconfig *it)
        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;
        }
index 2970e07debf8ad5054059221db4625684e7ceb5b..bd1ecd9c7af5a6e751d40ede93c6fc22dcb118c2 100644 (file)
@@ -610,7 +610,7 @@ static int hpdi_attach(comedi_device *dev, comedi_devconfig *it)
        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 );
index 3541cdf244429b9f68d105f9c3e1209f6f425877..38c6752570aa5c33d934a9a30aa0af2d9532b92b 100644 (file)
@@ -928,7 +928,7 @@ static int icp_multi_attach(comedi_device *dev,comedi_devconfig *it)
 
        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 */
                        }
index 718e29a40af5030242d836b375e97f97172390e7..13186c6ab255e0e3889ffa7496a772c97936b175 100644 (file)
@@ -303,7 +303,7 @@ static int me4000_attach(comedi_device *dev, comedi_devconfig *it){
        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{
index 436d0e04643438e0d57d464195ed7da7fe45075f..e3ea9cf5ea7c2fb9d665f873fb7d787e2a0e3fae 100644 (file)
@@ -394,7 +394,7 @@ static int ni6527_attach(comedi_device *dev,comedi_devconfig *it)
                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
index 1d1549298c03b4e8d80fb415f278bcb97f7bc23c..ca0798e3b53157c16e0cf54d5f7e1d675a60bac2 100644 (file)
@@ -699,7 +699,7 @@ static int ni_65xx_attach(comedi_device *dev,comedi_devconfig *it)
        /* 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");
index 9e6f73276ea54fdb0e468062342f9d20b3ff38d6..c2570a995b556b9d25486b82441becc66dc58732 100644 (file)
@@ -527,7 +527,7 @@ int labpc_common_attach( comedi_device *dev, unsigned long iobase,
        {
                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);
index fcce23a8508a4b41870f37f3efb04ed68bd0aa50..4a0ef233935f9c00f78274833b2fe0b2cf009fb8 100644 (file)
@@ -173,7 +173,7 @@ static ni_board ni_boards[]={
 
 #define IRQ_POLARITY 1
 
-#define NI_E_IRQ_FLAGS         SA_SHIRQ
+#define NI_E_IRQ_FLAGS         IRQF_SHARED
 
 typedef struct{
        dev_link_t *link;
index 7630bfbf51cb2c528bfb03cd586d6c5bf6897662..8f50219b857a45eb753373022cfe2772a25694cf 100644 (file)
@@ -1175,7 +1175,7 @@ static int nidio_attach(comedi_device *dev,comedi_devconfig *it)
                /* 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");
                }
index 50d51f80dd11356690c5f4b637f22c1864f3269b..94fe5931e1e597aee6cb0d1d559f3430264b30a4 100644 (file)
@@ -1444,7 +1444,7 @@ static uint32_t m_series_stc_readl(comedi_device *dev, int reg)
 #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"
 
index 0c2d7fbb0aaf3ef2c66bf7d198365cf0abe4647f..d15b5aec39f50d6236e6b8993b94f87055a0fb69 100644 (file)
@@ -485,7 +485,7 @@ static int pcmmio_attach(comedi_device *dev, comedi_devconfig *it)
     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) {
index 45cdd2d923aebf449f922bdaa79efe1dff5a5559..71840663fda9b86c11b0cec43ba9c1be78f49112 100644 (file)
@@ -415,7 +415,7 @@ static int pcmuio_attach(comedi_device *dev, comedi_devconfig *it)
     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) {
index b8fa662a63a846ac4777eb632a77d399148dd802..2e58b512ae3a4441f2041b61e0848265d8b6eac6 100644 (file)
@@ -924,7 +924,7 @@ static int rtd_attach (
 
        /* 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;
        }
index 1bef910a8feb4fce722f8ebd6cc67cd9a12405f2..506fa89999afc9e1d817be05dbaafc6db060ed66 100644 (file)
@@ -566,7 +566,7 @@ static int s626_attach(comedi_device *dev,comedi_devconfig *it)
   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;
     }
index c0aea1737d3f54707dcfe628ac3fa1b40d3754ad..debe8a1b68c3e7f0e91d12e4ec717855c8a05bcb 100644 (file)
@@ -73,12 +73,12 @@ int comedi_request_irq(unsigned irq, irqreturn_t (*handler)(int, void *,struct p
        /* 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);
index 2e7b46aec39c0a2bcdc61d36240f68be2f5c6d27..1cea8d93e40c174a26f3852b6c7f819303fa33a3 100644 (file)
 #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
@@ -35,7 +60,5 @@ typedef void irqreturn_t;
 #define PT_REGS_ARG
 #endif
 
-#include_next <linux/interrupt.h>
-
 #endif