summaryrefslogtreecommitdiff
path: root/linux/drivers/media/common/saa7146_core.c
diff options
context:
space:
mode:
authorMichael Hunold <devnull@localhost>2003-05-06 14:34:25 +0000
committerMichael Hunold <devnull@localhost>2003-05-06 14:34:25 +0000
commit727ae8131115f07cee5f9ac5404ce1977fca5dcd (patch)
treedc260dc6e1f04ed8ba62b6a278d7d4991c16a49f /linux/drivers/media/common/saa7146_core.c
parent5b30c2e4c3167d50c40e49520bc9530bab2b47f5 (diff)
downloadmediapointer-dvb-s2-727ae8131115f07cee5f9ac5404ce1977fca5dcd.tar.gz
mediapointer-dvb-s2-727ae8131115f07cee5f9ac5404ce1977fca5dcd.tar.bz2
The irq handler subsystem in 2.5 has changed. Add some code to get
it compile again under both 2.5 and 2.4.
Diffstat (limited to 'linux/drivers/media/common/saa7146_core.c')
-rw-r--r--linux/drivers/media/common/saa7146_core.c13
1 files changed, 11 insertions, 2 deletions
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
}
/*********************************************************************************/