From 8024406299d460855c02c3840c11d0840f559d00 Mon Sep 17 00:00:00 2001 From: Ian Abbott Date: Mon, 31 Jul 2006 13:14:33 +0000 Subject: [PATCH] Fixed compiler warnings about unused variable in the interrupt handler when building for 2.4 kernel. --- comedi/drivers/adl_pci9111.c | 5 ++--- comedi/drivers/adv_pci1710.c | 5 ++--- comedi/drivers/amplc_pc236.c | 17 ++++++++--------- comedi/drivers/amplc_pci230.c | 3 +-- comedi/drivers/cb_pcidas.c | 3 +-- comedi/drivers/cb_pcidas64.c | 3 +-- comedi/drivers/ni_pcidio.c | 3 +-- 7 files changed, 16 insertions(+), 23 deletions(-) diff --git a/comedi/drivers/adl_pci9111.c b/comedi/drivers/adl_pci9111.c index cb07eaff..a147bf5f 100644 --- a/comedi/drivers/adl_pci9111.c +++ b/comedi/drivers/adl_pci9111.c @@ -956,7 +956,6 @@ pci9111_interrupt (int irq, void *p_device, struct pt_regs *regs) comedi_subdevice *subdevice = dev->read_subdev; comedi_async *async; unsigned long irq_flags; - int handled = 1; async = subdevice->async; @@ -976,7 +975,7 @@ pci9111_interrupt (int irq, void *p_device, struct pt_regs *regs) async->events |= COMEDI_CB_ERROR | COMEDI_CB_EOA; comedi_event (dev, subdevice, async->events); - return IRQ_RETVAL(handled); + return IRQ_HANDLED; } if (pci9111_is_fifo_half_full()) @@ -1049,7 +1048,7 @@ pci9111_interrupt (int irq, void *p_device, struct pt_regs *regs) comedi_event (dev, subdevice, async->events); - return IRQ_RETVAL(handled); + return IRQ_HANDLED; } // ------------------------------------------------------------------ diff --git a/comedi/drivers/adv_pci1710.c b/comedi/drivers/adv_pci1710.c index 2ee39c27..eed2315a 100644 --- a/comedi/drivers/adv_pci1710.c +++ b/comedi/drivers/adv_pci1710.c @@ -718,7 +718,6 @@ static void interrupt_pci1710_half_fifo(void *d) static irqreturn_t interrupt_service_pci1710(int irq, void *d, struct pt_regs *regs) { comedi_device *dev = d; - int retval = 1; DPRINTK("adv_pci1710 EDBG: BGN: interrupt_service_pci1710(%d,...)\n",irq); if (!(inw(dev->iobase + PCI171x_STATUS) & Status_IRQ)) // is this interrupt from our board? @@ -738,7 +737,7 @@ static irqreturn_t interrupt_service_pci1710(int irq, void *d, struct pt_regs *r outw(devpriv->CntrlReg, dev->iobase+PCI171x_CONTROL); // start pacer start_pacer(dev, 1, devpriv->ai_et_div1, devpriv->ai_et_div2); - return IRQ_RETVAL(retval); + return IRQ_HANDLED; } if (devpriv->ai_eos) { // We use FIFO half full INT or not? interrupt_pci1710_every_sample(d); @@ -746,7 +745,7 @@ static irqreturn_t interrupt_service_pci1710(int irq, void *d, struct pt_regs *r interrupt_pci1710_half_fifo(d); } DPRINTK("adv_pci1710 EDBG: END: interrupt_service_pci1710(...)\n"); - return IRQ_RETVAL(retval); + return IRQ_HANDLED; } /* diff --git a/comedi/drivers/amplc_pc236.c b/comedi/drivers/amplc_pc236.c index 398766a8..a0a7f658 100644 --- a/comedi/drivers/amplc_pc236.c +++ b/comedi/drivers/amplc_pc236.c @@ -539,15 +539,14 @@ static irqreturn_t pc236_interrupt(int irq,void *d,struct pt_regs *regs) { comedi_device *dev=d; comedi_subdevice *s=dev->subdevices+1; - int retval = 1; + int handled; - if(!pc236_intr_check(dev)) - return IRQ_RETVAL(retval); - - comedi_buf_put(s->async,0); - s->async->events |= COMEDI_CB_BLOCK | COMEDI_CB_EOS; - - comedi_event(dev,s,s->async->events); - return IRQ_RETVAL(retval); + handled = pc236_intr_check(dev); + if (handled) { + comedi_buf_put(s->async,0); + s->async->events |= COMEDI_CB_BLOCK | COMEDI_CB_EOS; + comedi_event(dev,s,s->async->events); + } + return IRQ_RETVAL(handled); } diff --git a/comedi/drivers/amplc_pci230.c b/comedi/drivers/amplc_pci230.c index 8e4b4305..24ab4770 100644 --- a/comedi/drivers/amplc_pci230.c +++ b/comedi/drivers/amplc_pci230.c @@ -1402,7 +1402,6 @@ static irqreturn_t pci230_interrupt(int irq, void *d, struct pt_regs *regs) int status_int; comedi_device *dev = (comedi_device*) d; comedi_subdevice *s; - int retval = 1; /* Read interrupt status/enable register. */ status_int = inb(devpriv->pci_iobase + PCI230_INT_SCE); @@ -1439,7 +1438,7 @@ static irqreturn_t pci230_interrupt(int irq, void *d, struct pt_regs *regs) s->async->events = 0; } - return IRQ_RETVAL(retval); + return IRQ_HANDLED; } static void pci230_handle_ao(comedi_device *dev, comedi_subdevice *s) { diff --git a/comedi/drivers/cb_pcidas.c b/comedi/drivers/cb_pcidas.c index 0dd7c5b5..8c573213 100644 --- a/comedi/drivers/cb_pcidas.c +++ b/comedi/drivers/cb_pcidas.c @@ -1502,7 +1502,6 @@ static irqreturn_t cb_pcidas_interrupt(int irq, void *d, struct pt_regs *regs) unsigned int num_samples, i; static const int timeout = 10000; unsigned long flags; - int retval = 1; if(dev->attached == 0) { @@ -1607,7 +1606,7 @@ static irqreturn_t cb_pcidas_interrupt(int irq, void *d, struct pt_regs *regs) comedi_event(dev, s, async->events); - return IRQ_RETVAL(retval); + return IRQ_HANDLED; } static void handle_ao_interrupt(comedi_device *dev, unsigned int status) diff --git a/comedi/drivers/cb_pcidas64.c b/comedi/drivers/cb_pcidas64.c index 8c4832e4..68900bdb 100644 --- a/comedi/drivers/cb_pcidas64.c +++ b/comedi/drivers/cb_pcidas64.c @@ -3050,7 +3050,6 @@ static irqreturn_t handle_interrupt(int irq, void *d, struct pt_regs *regs) unsigned short status; uint32_t plx_status; uint32_t plx_bits; - int retval = 1; plx_status = readl(priv(dev)->plx9080_iobase + PLX_INTRCS_REG); status = readw(priv(dev)->main_iobase + HW_STATUS_REG); @@ -3079,7 +3078,7 @@ static irqreturn_t handle_interrupt(int irq, void *d, struct pt_regs *regs) DEBUG_PRINT("exiting handler\n"); - return IRQ_RETVAL( retval ); + return IRQ_HANDLED; } void abort_dma(comedi_device *dev, unsigned int channel) diff --git a/comedi/drivers/ni_pcidio.c b/comedi/drivers/ni_pcidio.c index 2e87988a..f04614d7 100644 --- a/comedi/drivers/ni_pcidio.c +++ b/comedi/drivers/ni_pcidio.c @@ -435,7 +435,6 @@ static irqreturn_t nidio_interrupt(int irq, void *d, struct pt_regs *regs) int status; int work = 0; unsigned int m_status; - int retval = 1; status = readb(devpriv->mite->daq_io_addr+Interrupt_And_Window_Status); flags = readb(devpriv->mite->daq_io_addr+Group_1_Flags); @@ -580,7 +579,7 @@ out: writeb(0x03,devpriv->mite->daq_io_addr+Master_DMA_And_Interrupt_Control); } #endif - return IRQ_RETVAL(retval); + return IRQ_HANDLED; } #ifdef DEBUG_FLAGS -- 2.26.2