diff options
author | markster <markster@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2004-01-06 13:26:44 +0000 |
---|---|---|
committer | markster <markster@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2004-01-06 13:26:44 +0000 |
commit | 80f25d9ed6ea4af860f3127bad4cf43bbd258b5c (patch) | |
tree | 09a511f55802af71ff92d3f846198a03b1dbd534 /wct4xxp.c | |
parent | abf800fc845ce8736704cbe769f831b73700fa04 (diff) |
Clean build on Linux 2.6, will need lots of testing
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@292 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'wct4xxp.c')
-rwxr-xr-x | wct4xxp.c | 28 |
1 files changed, 23 insertions, 5 deletions
@@ -191,7 +191,7 @@ static inline unsigned int __t4_pci_in(struct t4 *wc, const unsigned int addr) static inline void t4_pci_out(struct t4 *wc, const unsigned int addr, const unsigned int value) { - long flags; + unsigned long flags; spin_lock_irqsave(&wc->reglock, flags); __t4_pci_out(wc, addr, value); spin_unlock_irqrestore(&wc->reglock, flags); @@ -215,7 +215,7 @@ static inline void t4_activate(struct t4 *wc) static inline unsigned int t4_pci_in(struct t4 *wc, const unsigned int addr) { unsigned int ret; - long flags; + unsigned long flags; spin_lock_irqsave(&wc->reglock, flags); ret = __t4_pci_in(wc, addr); @@ -525,13 +525,17 @@ static int t4_chanconfig(struct zt_chan *chan, int sigtype) static int t4_open(struct zt_chan *chan) { +#ifndef LINUX26 MOD_INC_USE_COUNT; +#endif return 0; } static int t4_close(struct zt_chan *chan) { +#ifndef LINUX26 MOD_DEC_USE_COUNT; +#endif return 0; } @@ -845,7 +849,7 @@ static int t4_findsync(struct t4 *wc) { int i; int x; - long flags; + unsigned long flags; int p; int nonzero; int newsyncsrc = 0; /* Zaptel span number */ @@ -1314,10 +1318,14 @@ static inline void __handle_leds(struct t4 *wc) #endif } +#ifdef LINUX26 +static irqreturn_t t4_interrupt(int irq, void *dev_id, struct pt_regs *regs) +#else static void t4_interrupt(int irq, void *dev_id, struct pt_regs *regs) +#endif { struct t4 *wc = dev_id; - long flags; + unsigned long flags; int x; unsigned int status; @@ -1337,11 +1345,19 @@ static void t4_interrupt(int irq, void *dev_id, struct pt_regs *regs) /* Ignore if it's not for us */ if (!status) +#ifdef LINUX26 + return IRQ_NONE; +#else return; +#endif if (!wc->spansstarted) { printk("Not prepped yet!\n"); +#ifdef LINUX26 + return IRQ_NONE; +#else return; +#endif } wc->intcount++; @@ -1388,7 +1404,9 @@ static void t4_interrupt(int irq, void *dev_id, struct pt_regs *regs) } spin_unlock_irqrestore(&wc->reglock, flags); - +#ifdef LINUX26 + return IRQ_RETVAL(1); +#endif } static int t4_reset_dma(struct t4 *wc) |