From 727ae8131115f07cee5f9ac5404ce1977fca5dcd Mon Sep 17 00:00:00 2001 From: Michael Hunold Date: Tue, 6 May 2003 14:34:25 +0000 Subject: The irq handler subsystem in 2.5 has changed. Add some code to get it compile again under both 2.5 and 2.4. --- linux/drivers/media/common/saa7146_core.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'linux/drivers/media/common/saa7146_core.c') diff --git a/linux/drivers/media/common/saa7146_core.c b/linux/drivers/media/common/saa7146_core.c index cad3931a4..5dfd191f5 100644 --- a/linux/drivers/media/common/saa7146_core.c +++ b/linux/drivers/media/common/saa7146_core.c @@ -187,8 +187,11 @@ void saa7146_setgpio(struct saa7146_dev *dev, int port, u32 data) /********************************************************************************/ /* interrupt handler */ - +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) static void interrupt_hw(int irq, void *dev_id, struct pt_regs *regs) +#else +static irqreturn_t interrupt_hw(int irq, void *dev_id, struct pt_regs *regs) +#endif { struct saa7146_dev *dev = (struct saa7146_dev*)dev_id; u32 isr = 0; @@ -199,11 +202,14 @@ static void interrupt_hw(int irq, void *dev_id, struct pt_regs *regs) /* is this our interrupt? */ if ( 0 == isr ) { /* nope, some other device */ +#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0) + return IRQ_RETVAL(0); +#else return; +#endif } saa7146_write(dev, ISR, isr); -// DEB_INT(("0x%08x\n",isr)); if( 0 != (dev->ext)) { if( 0 != (dev->ext->irq_mask & isr )) { @@ -250,6 +256,9 @@ static void interrupt_hw(int irq, void *dev_id, struct pt_regs *regs) ERR(("disabling interrupt source(s)!\n")); IER_DISABLE(dev,isr); } +#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0) + return IRQ_RETVAL(1); +#endif } /*********************************************************************************/ -- cgit v1.2.3