summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2006-12-11 18:34:20 +0000
committerkpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2006-12-11 18:34:20 +0000
commitee074dba8e79e5f405700ba7907b58572fbea8cb (patch)
tree214e2dd87c99d70a25e1a258e3a196406041fc15
parentc25e581f257e416f2f02144fdac2d6e3a78712d9 (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.c6
-rw-r--r--tor2.c13
-rw-r--r--torisa.c6
-rw-r--r--wcfxo.c6
-rw-r--r--wct1xxp.c6
-rw-r--r--wct4xxp/base.c12
-rw-r--r--wctdm.c6
-rw-r--r--wctdm24xxp.c6
-rw-r--r--wcte11xp.c6
-rw-r--r--wcusb.c14
-rw-r--r--zaptel.h10
11 files changed, 28 insertions, 63 deletions
diff --git a/pciradio.c b/pciradio.c
index c658f20..10ea7b2 100644
--- a/pciradio.c
+++ b/pciradio.c
@@ -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;
diff --git a/tor2.c b/tor2.c
index a610511..bc92e84 100644
--- a/tor2.c
+++ b/tor2.c
@@ -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;
diff --git a/torisa.c b/torisa.c
index a037af5..5fb4996 100644
--- a/torisa.c
+++ b/torisa.c
@@ -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;
diff --git a/wcfxo.c b/wcfxo.c
index a78174b..bfcef76 100644
--- a/wcfxo.c
+++ b/wcfxo.c
@@ -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;
diff --git a/wct1xxp.c b/wct1xxp.c
index 40d7de2..201292a 100644
--- a/wct1xxp.c
+++ b/wct1xxp.c
@@ -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;
diff --git a/wctdm.c b/wctdm.c
index c4b184f..4e500e1 100644
--- a/wctdm.c
+++ b/wctdm.c
@@ -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;
diff --git a/wcte11xp.c b/wcte11xp.c
index 5ea5832..7d2850d 100644
--- a/wcte11xp.c
+++ b/wcte11xp.c
@@ -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;
diff --git a/wcusb.c b/wcusb.c
index 4465068..2d1f7fd 100644
--- a/wcusb.c
+++ b/wcusb.c
@@ -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)
diff --git a/zaptel.h b/zaptel.h
index 17a7503..b7850c4 100644
--- a/zaptel.h
+++ b/zaptel.h
@@ -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"