diff options
Diffstat (limited to 'wcfxo.c')
-rwxr-xr-x | wcfxo.c | 29 |
1 files changed, 26 insertions, 3 deletions
@@ -91,7 +91,7 @@ #define PEGCOUNT 5 /* 5 cycles of pegging means RING */ struct reg { - int flags; + unsigned long flags; unsigned char index; unsigned char reg; unsigned char value; @@ -108,7 +108,7 @@ struct wcfxo { int usecount; int dead; int pos; - int flags; + unsigned long flags; int freeregion; int ring; int offhook; @@ -162,7 +162,7 @@ struct wcfxo { struct wcfxo_desc { char *name; - int flags; + unsigned long flags; }; @@ -387,7 +387,11 @@ static void wcfxo_tasklet(unsigned long data) static void wcfxo_stop_dma(struct wcfxo *wc); static void wcfxo_restart_dma(struct wcfxo *wc); +#ifdef LINUX26 +static irqreturn_t wcfxo_interrupt(int irq, void *dev_id, struct pt_regs *regs) +#else static void wcfxo_interrupt(int irq, void *dev_id, struct pt_regs *regs) +#endif { struct wcfxo *wc = dev_id; unsigned char ints; @@ -402,7 +406,11 @@ static void wcfxo_interrupt(int irq, void *dev_id, struct pt_regs *regs) if (!ints) +#ifdef LINUX26 + return IRQ_NONE; +#else return; +#endif if (ints & 0x0c) { /* if there is a rx interrupt pending */ #ifdef ENABLE_TASKLETS @@ -425,12 +433,20 @@ static void wcfxo_interrupt(int irq, void *dev_id, struct pt_regs *regs) printk("FXO PCI Master abort\n"); /* Stop DMA andlet the watchdog start it again */ wcfxo_stop_dma(wc); +#ifdef LINUX26 + return IRQ_RETVAL(1); +#else return; +#endif } if (ints & 0x20) { printk("PCI Target abort\n"); +#ifdef LINUX26 + return IRQ_RETVAL(1); +#else return; +#endif } if (1 /* !(wc->report % 0xf) */) { /* Check for BATTERY from register and debounce for 8 ms */ @@ -504,6 +520,9 @@ static void wcfxo_interrupt(int irq, void *dev_id, struct pt_regs *regs) #endif } +#ifdef LINUX26 + return IRQ_RETVAL(1); +#endif } static int wcfxo_setreg(struct wcfxo *wc, unsigned char reg, unsigned char value) @@ -527,7 +546,9 @@ static int wcfxo_open(struct zt_chan *chan) if (wc->dead) return -ENODEV; wc->usecount++; +#ifndef LINUX26 MOD_INC_USE_COUNT; +#endif return 0; } @@ -542,7 +563,9 @@ static int wcfxo_close(struct zt_chan *chan) { struct wcfxo *wc = chan->pvt; wc->usecount--; +#ifndef LINUX26 MOD_DEC_USE_COUNT; +#endif /* If we're dead, release us now */ if (!wc->usecount && wc->dead) wcfxo_release(wc); |