[svn-commits] kpfleming: branch 1.2 r1697 - in /branches/1.2: ./ wct4xxp/

svn-commits at lists.digium.com svn-commits at lists.digium.com
Mon Dec 11 11:27:15 MST 2006


Author: kpfleming
Date: Mon Dec 11 12:27:15 2006
New Revision: 1697

URL: http://svn.digium.com/view/zaptel?view=rev&rev=1697
Log:
kernel 2.6.19 API changes compatibility

Modified:
    branches/1.2/pciradio.c
    branches/1.2/tor2.c
    branches/1.2/torisa.c
    branches/1.2/wcfxo.c
    branches/1.2/wct1xxp.c
    branches/1.2/wct4xxp/base.c
    branches/1.2/wctdm.c
    branches/1.2/wctdm24xxp.c
    branches/1.2/wcte11xp.c
    branches/1.2/wcusb.c
    branches/1.2/zaptel.h

Modified: branches/1.2/pciradio.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/pciradio.c?view=diff&rev=1697&r1=1696&r2=1697
==============================================================================
--- branches/1.2/pciradio.c (original)
+++ branches/1.2/pciradio.c Mon Dec 11 12:27:15 2006
@@ -712,11 +712,7 @@
 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;

Modified: branches/1.2/tor2.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/tor2.c?view=diff&rev=1697&r1=1696&r2=1697
==============================================================================
--- branches/1.2/tor2.c (original)
+++ branches/1.2/tor2.c Mon Dec 11 12:27:15 2006
@@ -190,12 +190,7 @@
 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 @@
 	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;

Modified: branches/1.2/torisa.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/torisa.c?view=diff&rev=1697&r1=1696&r2=1697
==============================================================================
--- branches/1.2/torisa.c (original)
+++ branches/1.2/torisa.c Mon Dec 11 12:27:15 2006
@@ -744,11 +744,7 @@
 
 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;

Modified: branches/1.2/wcfxo.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/wcfxo.c?view=diff&rev=1697&r1=1696&r2=1697
==============================================================================
--- branches/1.2/wcfxo.c (original)
+++ branches/1.2/wcfxo.c Mon Dec 11 12:27:15 2006
@@ -396,11 +396,7 @@
 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;

Modified: branches/1.2/wct1xxp.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/wct1xxp.c?view=diff&rev=1697&r1=1696&r2=1697
==============================================================================
--- branches/1.2/wct1xxp.c (original)
+++ branches/1.2/wct1xxp.c Mon Dec 11 12:27:15 2006
@@ -1126,11 +1126,7 @@
 	}
 }
 
-#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;

Modified: branches/1.2/wct4xxp/base.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/wct4xxp/base.c?view=diff&rev=1697&r1=1696&r2=1697
==============================================================================
--- branches/1.2/wct4xxp/base.c (original)
+++ branches/1.2/wct4xxp/base.c Mon Dec 11 12:27:15 2006
@@ -2238,11 +2238,7 @@
 }
 
 #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 @@
 	}
 }
 
-#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;

Modified: branches/1.2/wctdm.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/wctdm.c?view=diff&rev=1697&r1=1696&r2=1697
==============================================================================
--- branches/1.2/wctdm.c (original)
+++ branches/1.2/wctdm.c Mon Dec 11 12:27:15 2006
@@ -1024,11 +1024,7 @@
 	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;

Modified: branches/1.2/wctdm24xxp.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/wctdm24xxp.c?view=diff&rev=1697&r1=1696&r2=1697
==============================================================================
--- branches/1.2/wctdm24xxp.c (original)
+++ branches/1.2/wctdm24xxp.c Mon Dec 11 12:27:15 2006
@@ -1422,11 +1422,7 @@
 	}	
 }
 
-#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;

Modified: branches/1.2/wcte11xp.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/wcte11xp.c?view=diff&rev=1697&r1=1696&r2=1697
==============================================================================
--- branches/1.2/wcte11xp.c (original)
+++ branches/1.2/wcte11xp.c Mon Dec 11 12:27:15 2006
@@ -1257,11 +1257,7 @@
 	}
 }
 
-#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;

Modified: branches/1.2/wcusb.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/wcusb.c?view=diff&rev=1697&r1=1696&r2=1697
==============================================================================
--- branches/1.2/wcusb.c (original)
+++ branches/1.2/wcusb.c Mon Dec 11 12:27:15 2006
@@ -184,7 +184,7 @@
 }					  
 
 #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 @@
 }
 
 #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 @@
 }
 
 #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 @@
 }
 
 #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 @@
 }
 
 #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 @@
 	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 @@
 	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)

Modified: branches/1.2/zaptel.h
URL: http://svn.digium.com/view/zaptel/branches/1.2/zaptel.h?view=diff&rev=1697&r1=1696&r2=1697
==============================================================================
--- branches/1.2/zaptel.h (original)
+++ branches/1.2/zaptel.h Mon Dec 11 12:27:15 2006
@@ -54,6 +54,16 @@
 #define zap_pci_module pci_register_driver
 #else
 #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"



More information about the svn-commits mailing list