diff options
author | kpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2006-12-11 18:34:20 +0000 |
---|---|---|
committer | kpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2006-12-11 18:34:20 +0000 |
commit | ee074dba8e79e5f405700ba7907b58572fbea8cb (patch) | |
tree | 214e2dd87c99d70a25e1a258e3a196406041fc15 | |
parent | c25e581f257e416f2f02144fdac2d6e3a78712d9 (diff) |
Merged revisions 1698 via svnmerge from
https://origsvn.digium.com/svn/zaptel/branches/1.4
................
r1698 | kpfleming | 2006-12-11 12:31:12 -0600 (Mon, 11 Dec 2006) | 10 lines
Merged revisions 1697 via svnmerge from
https://origsvn.digium.com/svn/zaptel/branches/1.2
........
r1697 | kpfleming | 2006-12-11 12:27:15 -0600 (Mon, 11 Dec 2006) | 2 lines
kernel 2.6.19 API changes compatibility
........
................
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@1699 5390a7c7-147a-4af0-8ec9-7488f05a26cb
-rw-r--r-- | pciradio.c | 6 | ||||
-rw-r--r-- | tor2.c | 13 | ||||
-rw-r--r-- | torisa.c | 6 | ||||
-rw-r--r-- | wcfxo.c | 6 | ||||
-rw-r--r-- | wct1xxp.c | 6 | ||||
-rw-r--r-- | wct4xxp/base.c | 12 | ||||
-rw-r--r-- | wctdm.c | 6 | ||||
-rw-r--r-- | wctdm24xxp.c | 6 | ||||
-rw-r--r-- | wcte11xp.c | 6 | ||||
-rw-r--r-- | wcusb.c | 14 | ||||
-rw-r--r-- | zaptel.h | 10 |
11 files changed, 28 insertions, 63 deletions
@@ -713,11 +713,7 @@ static void pciradio_stop_dma(struct pciradio *rad); static void pciradio_reset_serial(struct pciradio *rad); static void pciradio_restart_dma(struct pciradio *rad); -#ifdef LINUX26 -static irqreturn_t pciradio_interrupt(int irq, void *dev_id, struct pt_regs *regs) -#else -static void pciradio_interrupt(int irq, void *dev_id, struct pt_regs *regs) -#endif +ZAP_IRQ_HANDLER(pciradio_interrupt) { struct pciradio *rad = dev_id; unsigned char ints,byte1,byte2,gotcor,gotctcss,gotslowctcss,ctcss; @@ -190,12 +190,7 @@ static int tor2_shutdown(struct zt_span *span); static int tor2_rbsbits(struct zt_chan *chan, int bits); static int tor2_maint(struct zt_span *span, int cmd); static int tor2_ioctl(struct zt_chan *chan, unsigned int cmd, unsigned long data); -#ifdef LINUX26 -static irqreturn_t tor2_intr(int irq, void *dev_id, struct pt_regs *regs); -#else -static void tor2_intr(int irq, void *dev_id, struct pt_regs *regs); -#endif - +ZAP_IRQ_HANDLER(tor2_intr); /* translations of data channels for 24 channels in a 32 bit PCM highway */ unsigned datxlt_t1[] = { @@ -1188,11 +1183,7 @@ found: return 0; } -#ifdef LINUX26 -static irqreturn_t tor2_intr(int irq, void *dev_id, struct pt_regs *regs) -#else -static void tor2_intr(int irq, void *dev_id, struct pt_regs *regs) -#endif +ZAP_IRQ_HANDLER(tor2_intr) { int n, i, j, k, syncsrc; unsigned int rxword,txword; @@ -742,11 +742,7 @@ static void torisa_tasklet(unsigned long data) static int txerrors; -#ifdef LINUX26 -static irqreturn_t torisa_intr(int irq, void *dev_id, struct pt_regs *regs) -#else -static void torisa_intr(int irq, void *dev_id, struct pt_regs *regs) -#endif +ZAP_IRQ_HANDLER(torisa_intr) { static unsigned int passno = 0, mysynccnt = 0, lastsyncsrc = -1; int n, n1, i, j, k, x, mysyncsrc, oldn; @@ -396,11 +396,7 @@ 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 +ZAP_IRQ_HANDLER(wcfxo_interrupt) { struct wcfxo *wc = dev_id; unsigned char ints; @@ -1126,11 +1126,7 @@ static void __t1xxp_do_counters(struct t1xxp *wc) } } -#ifdef LINUX26 -static irqreturn_t t1xxp_interrupt(int irq, void *dev_id, struct pt_regs *regs) -#else -static void t1xxp_interrupt(int irq, void *dev_id, struct pt_regs *regs) -#endif +ZAP_IRQ_HANDLER(t1xxp_interrupt) { struct t1xxp *wc = dev_id; unsigned char ints; diff --git a/wct4xxp/base.c b/wct4xxp/base.c index 54f13dc..abedb72 100644 --- a/wct4xxp/base.c +++ b/wct4xxp/base.c @@ -2718,11 +2718,7 @@ static inline void __t4_framer_interrupt(struct t4 *wc, int span) } #ifdef SUPPORT_GEN1 -#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 +ZAP_IRQ_HANDLER(t4_interrupt) { struct t4 *wc = dev_id; unsigned long flags; @@ -2822,11 +2818,7 @@ static void t4_interrupt(int irq, void *dev_id, struct pt_regs *regs) #endif -#ifdef LINUX26 -static irqreturn_t t4_interrupt_gen2(int irq, void *dev_id, struct pt_regs *regs) -#else -static void t4_interrupt_gen2(int irq, void *dev_id, struct pt_regs *regs) -#endif +ZAP_IRQ_HANDLER(t4_interrupt_gen2) { struct t4 *wc = dev_id; unsigned long flags; @@ -1029,11 +1029,7 @@ static inline void wctdm_proslic_check_hook(struct wctdm *wc, int card) wc->mod[card].fxs.lastrxhook = hook; } -#ifdef LINUX26 -static irqreturn_t wctdm_interrupt(int irq, void *dev_id, struct pt_regs *regs) -#else -static void wctdm_interrupt(int irq, void *dev_id, struct pt_regs *regs) -#endif +ZAP_IRQ_HANDLER(wctdm_interrupt) { struct wctdm *wc = dev_id; unsigned char ints; diff --git a/wctdm24xxp.c b/wctdm24xxp.c index 6606feb..949abaa 100644 --- a/wctdm24xxp.c +++ b/wctdm24xxp.c @@ -1553,11 +1553,7 @@ static void wctdm_init_descriptors(struct wctdm *wc) } } -#ifdef LINUX26 -static irqreturn_t wctdm_interrupt(int irq, void *dev_id, struct pt_regs *regs) -#else -static void wctdm_interrupt(int irq, void *dev_id, struct pt_regs *regs) -#endif +ZAP_IRQ_HANDLER(wctdm_interrupt) { struct wctdm *wc = dev_id; unsigned int ints; @@ -1281,11 +1281,7 @@ static void __t1_do_counters(struct t1 *wc) } } -#ifdef LINUX26 -static irqreturn_t t1xxp_interrupt(int irq, void *dev_id, struct pt_regs *regs) -#else -static void t1xxp_interrupt(int irq, void *dev_id, struct pt_regs *regs) -#endif +ZAP_IRQ_HANDLER(t1xxp_interrupt) { struct t1 *wc = dev_id; unsigned char ints; @@ -183,7 +183,7 @@ static int Wcusb_ReadWcRegs(struct usb_device *dev, unsigned char index, } #ifdef USB2420 -#ifdef LINUX26 +#if defined(LINUX26) && (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)) static int wcusb_async_read(struct wc_usb_pvt *p, unsigned char index, unsigned char *data, int len, int state, void (*complete)(struct urb *urb, struct pt_regs *regs)); static int wcusb_async_write(struct wc_usb_pvt *p, unsigned char index, unsigned char *data, int len, int state, void (*complete)(struct urb *urb, struct pt_regs *regs)); static void wcusb_async_control(struct urb *urb, struct pt_regs *regs); @@ -219,7 +219,7 @@ static void proslic_write_direct_async(struct wc_usb_pvt *p, unsigned char addre } #ifdef USB2420 -#ifdef LINUX26 +#if defined(LINUX26) && (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)) static void wcusb_async_control(struct urb *urb, struct pt_regs *regs) #else static void wcusb_async_control(struct urb *urb) @@ -311,7 +311,7 @@ static void wcusb_async_control(urb_t *urb) } #ifdef USB2420 -#ifdef LINUX26 +#if defined(LINUX26) && (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)) static void keypad_check_done(struct urb *urb, struct pt_regs *regs) #else static void keypad_check_done(struct urb *urb) @@ -428,7 +428,7 @@ static void wcusb_check_interrupt(struct wc_usb_pvt *p) } #ifdef USB2420 -#ifdef LINUX26 +#if defined(LINUX26) && (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)) static int wcusb_async_read(struct wc_usb_pvt *p, unsigned char index, unsigned char *data, int len, int state, void (*complete)(struct urb *urb, struct pt_regs *regs)) #else static int wcusb_async_read(struct wc_usb_pvt *p, unsigned char index, unsigned char *data, int len, int state, void (*complete)(struct urb *urb)) @@ -476,7 +476,7 @@ static int wcusb_async_read(struct wc_usb_pvt *p, unsigned char index, unsigned } #ifdef USB2420 -#ifdef LINUX26 +#if defined(LINUX26) && (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)) static int wcusb_async_write(struct wc_usb_pvt *p, unsigned char index, unsigned char *data, int len, int state, void (*complete)(struct urb *urb, struct pt_regs *regs)) #else static int wcusb_async_write(struct wc_usb_pvt *p, unsigned char index, unsigned char *data, int len, int state, void (*complete)(struct urb *urb)) @@ -882,7 +882,7 @@ static char wc_dtmf(struct wc_usb_pvt *p) return ZT_LIN2MU(linsample); } -#ifdef LINUX26 +#if defined(LINUX26) && (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)) static void wcusb_read_complete(struct urb *q, struct pt_regs *regs) #else static void wcusb_read_complete(struct urb *q) @@ -948,7 +948,7 @@ static void wcusb_read_complete(struct urb *q) return; } -#ifdef LINUX26 +#if defined(LINUX26) && (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)) static void wcusb_write_complete(struct urb *q, struct pt_regs *regs) #else static void wcusb_write_complete(struct urb *q) @@ -59,6 +59,16 @@ #define zap_pci_module pci_module_init #endif +#ifdef LINUX26 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19) +#define ZAP_IRQ_HANDLER(a) static irqreturn_t a(int irq, void *dev_id) +#else +#define ZAP_IRQ_HANDLER(a) static irqreturn_t a(int irq, void *dev_id, struct pt_regs *regs) +#endif +#else +#define ZAP_IRQ_HANDLER(a) static void a(int irq, void *dev_id, struct pt_regs *regs) +#endif + #include "ecdis.h" #include "fasthdlc.h" |