summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2006-12-11 18:27:15 +0000
committerkpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2006-12-11 18:27:15 +0000
commitc67fe7392e989f369f5af0bf5a3a9908efb6ca5c (patch)
tree64ddcef7ee3fd0a40e9d237c1e5e38d18862d8f4
parent5357ea9f7435fe331279f00921b7d28020606192 (diff)
kernel 2.6.19 API changes compatibility
git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.2@1697 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 c87f71c..c6a7175 100644
--- a/pciradio.c
+++ b/pciradio.c
@@ -712,11 +712,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 02aba05..cbb1a8c 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 2215cc8..999eff1 100644
--- a/torisa.c
+++ b/torisa.c
@@ -744,11 +744,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 3c6edce..5898c57 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 3c163dd..4aecf27 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 c980d8c..68200be 100644
--- a/wct4xxp/base.c
+++ b/wct4xxp/base.c
@@ -2238,11 +2238,7 @@ static inline void __handle_leds(struct t4 *wc)
}
#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;
@@ -2395,11 +2391,7 @@ static inline void __t4_framer_interrupt(struct t4 *wc, int span)
}
}
-#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 be3fc41..2636851 100644
--- a/wctdm.c
+++ b/wctdm.c
@@ -1024,11 +1024,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 b72a339..d8fb4e0 100644
--- a/wctdm24xxp.c
+++ b/wctdm24xxp.c
@@ -1422,11 +1422,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 a559146..3ac0291 100644
--- a/wcte11xp.c
+++ b/wcte11xp.c
@@ -1257,11 +1257,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 38c844c..5c98a08 100644
--- a/wcusb.c
+++ b/wcusb.c
@@ -184,7 +184,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);
@@ -220,7 +220,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)
@@ -312,7 +312,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)
@@ -429,7 +429,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))
@@ -477,7 +477,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))
@@ -883,7 +883,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)
@@ -949,7 +949,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 5afa493..c7b60f7 100644
--- a/zaptel.h
+++ b/zaptel.h
@@ -56,6 +56,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"
#endif