From: Ian Abbott Date: Wed, 27 Jun 2007 10:23:44 +0000 (+0000) Subject: Update deprecated interrupt flags (SA_SHIRQ => IRQF_SHARED). X-Git-Tag: r0_7_74~74 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e22aea73e770c76db6308934731445412f285d2f;p=comedi.git Update deprecated interrupt flags (SA_SHIRQ => IRQF_SHARED). --- diff --git a/comedi/drivers/addi-data/addi_common.c b/comedi/drivers/addi-data/addi_common.c index 7b83d7ad..b087d4c0 100644 --- a/comedi/drivers/addi-data/addi_common.c +++ b/comedi/drivers/addi-data/addi_common.c @@ -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 */ diff --git a/comedi/drivers/adl_pci9111.c b/comedi/drivers/adl_pci9111.c index d5ef0090..97695d84 100644 --- a/comedi/drivers/adl_pci9111.c +++ b/comedi/drivers/adl_pci9111.c @@ -1364,7 +1364,7 @@ found: { if (comedi_request_irq (pci_device->irq, pci9111_interrupt, - SA_SHIRQ, + IRQF_SHARED, PCI9111_DRIVER_NAME, dev)!=0) { diff --git a/comedi/drivers/adl_pci9118.c b/comedi/drivers/adl_pci9118.c index 6cef0cf3..ba8b380a 100644 --- a/comedi/drivers/adl_pci9118.c +++ b/comedi/drivers/adl_pci9118.c @@ -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 { diff --git a/comedi/drivers/adv_pci1710.c b/comedi/drivers/adv_pci1710.c index eb4261d4..731e0490 100644 --- a/comedi/drivers/adv_pci1710.c +++ b/comedi/drivers/adv_pci1710.c @@ -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 { diff --git a/comedi/drivers/amplc_dio200.c b/comedi/drivers/amplc_dio200.c index 509b1071..a9a7d917 100644 --- a/comedi/drivers/amplc_dio200.c +++ b/comedi/drivers/amplc_dio200.c @@ -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) { diff --git a/comedi/drivers/amplc_pc236.c b/comedi/drivers/amplc_pc236.c index 41618e67..30e9c05c 100644 --- a/comedi/drivers/amplc_pc236.c +++ b/comedi/drivers/amplc_pc236.c @@ -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) { diff --git a/comedi/drivers/amplc_pci224.c b/comedi/drivers/amplc_pci224.c index c815e305..76b68f33 100644 --- a/comedi/drivers/amplc_pci224.c +++ b/comedi/drivers/amplc_pci224.c @@ -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! " diff --git a/comedi/drivers/amplc_pci230.c b/comedi/drivers/amplc_pci230.c index 68c2e815..5e26cd23 100644 --- a/comedi/drivers/amplc_pci230.c +++ b/comedi/drivers/amplc_pci230.c @@ -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); } diff --git a/comedi/drivers/cb_das16_cs.c b/comedi/drivers/cb_das16_cs.c index 52d007b8..f70624c5 100644 --- a/comedi/drivers/cb_das16_cs.c +++ b/comedi/drivers/cb_das16_cs.c @@ -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; } diff --git a/comedi/drivers/cb_pcidas.c b/comedi/drivers/cb_pcidas.c index 8615b8d7..d0e7ba4e 100644 --- a/comedi/drivers/cb_pcidas.c +++ b/comedi/drivers/cb_pcidas.c @@ -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; diff --git a/comedi/drivers/cb_pcidas64.c b/comedi/drivers/cb_pcidas64.c index 9a51be38..5d02a75a 100644 --- a/comedi/drivers/cb_pcidas64.c +++ b/comedi/drivers/cb_pcidas64.c @@ -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; diff --git a/comedi/drivers/cb_pcimdas.c b/comedi/drivers/cb_pcimdas.c index e9b3b75f..4393bc39 100644 --- a/comedi/drivers/cb_pcimdas.c +++ b/comedi/drivers/cb_pcimdas.c @@ -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; diff --git a/comedi/drivers/dt3000.c b/comedi/drivers/dt3000.c index f65fd95e..569c1861 100644 --- a/comedi/drivers/dt3000.c +++ b/comedi/drivers/dt3000.c @@ -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; } diff --git a/comedi/drivers/gsc_hpdi.c b/comedi/drivers/gsc_hpdi.c index 2970e07d..bd1ecd9c 100644 --- a/comedi/drivers/gsc_hpdi.c +++ b/comedi/drivers/gsc_hpdi.c @@ -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 ); diff --git a/comedi/drivers/icp_multi.c b/comedi/drivers/icp_multi.c index 3541cdf2..38c67525 100644 --- a/comedi/drivers/icp_multi.c +++ b/comedi/drivers/icp_multi.c @@ -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 */ } diff --git a/comedi/drivers/me4000.c b/comedi/drivers/me4000.c index 718e29a4..13186c6a 100644 --- a/comedi/drivers/me4000.c +++ b/comedi/drivers/me4000.c @@ -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{ diff --git a/comedi/drivers/ni_6527.c b/comedi/drivers/ni_6527.c index 436d0e04..e3ea9cf5 100644 --- a/comedi/drivers/ni_6527.c +++ b/comedi/drivers/ni_6527.c @@ -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 diff --git a/comedi/drivers/ni_65xx.c b/comedi/drivers/ni_65xx.c index 1d154929..ca0798e3 100644 --- a/comedi/drivers/ni_65xx.c +++ b/comedi/drivers/ni_65xx.c @@ -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"); diff --git a/comedi/drivers/ni_labpc.c b/comedi/drivers/ni_labpc.c index 9e6f7327..c2570a99 100644 --- a/comedi/drivers/ni_labpc.c +++ b/comedi/drivers/ni_labpc.c @@ -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); diff --git a/comedi/drivers/ni_mio_cs.c b/comedi/drivers/ni_mio_cs.c index fcce23a8..4a0ef233 100644 --- a/comedi/drivers/ni_mio_cs.c +++ b/comedi/drivers/ni_mio_cs.c @@ -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; diff --git a/comedi/drivers/ni_pcidio.c b/comedi/drivers/ni_pcidio.c index 7630bfbf..8f50219b 100644 --- a/comedi/drivers/ni_pcidio.c +++ b/comedi/drivers/ni_pcidio.c @@ -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"); } diff --git a/comedi/drivers/ni_pcimio.c b/comedi/drivers/ni_pcimio.c index 50d51f80..94fe5931 100644 --- a/comedi/drivers/ni_pcimio.c +++ b/comedi/drivers/ni_pcimio.c @@ -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" diff --git a/comedi/drivers/pcmmio.c b/comedi/drivers/pcmmio.c index 0c2d7fbb..d15b5aec 100644 --- a/comedi/drivers/pcmmio.c +++ b/comedi/drivers/pcmmio.c @@ -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) { diff --git a/comedi/drivers/pcmuio.c b/comedi/drivers/pcmuio.c index 45cdd2d9..71840663 100644 --- a/comedi/drivers/pcmuio.c +++ b/comedi/drivers/pcmuio.c @@ -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) { diff --git a/comedi/drivers/rtd520.c b/comedi/drivers/rtd520.c index b8fa662a..2e58b512 100644 --- a/comedi/drivers/rtd520.c +++ b/comedi/drivers/rtd520.c @@ -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; } diff --git a/comedi/drivers/s626.c b/comedi/drivers/s626.c index 1bef910a..506fa899 100644 --- a/comedi/drivers/s626.c +++ b/comedi/drivers/s626.c @@ -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; } diff --git a/comedi/rt.c b/comedi/rt.c index c0aea173..debe8a1b 100644 --- a/comedi/rt.c +++ b/comedi/rt.c @@ -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); diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index 2e7b46ae..1cea8d93 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h @@ -19,15 +19,40 @@ #ifndef __COMPAT_LINUX_INTERRUPT_H_ #define __COMPAT_LINUX_INTERRUPT_H_ +#include_next + #include -#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 - #endif