diff options
author | kpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2008-01-25 23:59:37 +0000 |
---|---|---|
committer | kpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2008-01-25 23:59:37 +0000 |
commit | 860c46060672ec32918b3ea305c2d3a795bb6ae7 (patch) | |
tree | 9aa987489d6775df2b010af0897110be89bd4d44 | |
parent | d8e4f2d9d55628bdc758ffcdcf4321883770a721 (diff) |
get this branch to build against 2.6.24 kernel build system (similar to r3706 from tzafrir for branch-1.4)
git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.2@3741 5390a7c7-147a-4af0-8ec9-7488f05a26cb
-rw-r--r-- | Kbuild (renamed from Makefile.kernel26) | 0 | ||||
-rw-r--r-- | Makefile | 8 | ||||
-rw-r--r-- | pciradio.c | 9 | ||||
-rw-r--r-- | tor2.c | 6 | ||||
-rw-r--r-- | torisa.c | 10 | ||||
-rw-r--r-- | wcfxo.c | 7 | ||||
-rw-r--r-- | wct1xxp.c | 7 | ||||
-rw-r--r-- | wct4xxp/Kbuild (renamed from wct4xxp/Makefile.kernel26) | 4 | ||||
-rw-r--r-- | wct4xxp/Makefile | 5 | ||||
-rw-r--r-- | wct4xxp/base.c | 7 | ||||
-rw-r--r-- | wct4xxp/vpm450m.h | 7 | ||||
-rw-r--r-- | wctc4xxp/Kbuild (renamed from wctc4xxp/Makefile.kernel26) | 4 | ||||
-rw-r--r-- | wctc4xxp/Makefile | 9 | ||||
-rw-r--r-- | wctc4xxp/base.c | 6 | ||||
-rw-r--r-- | wctdm.c | 4 | ||||
-rw-r--r-- | wctdm24xxp/Kbuild (renamed from wctdm24xxp/Makefile.kernel26) | 4 | ||||
-rw-r--r-- | wctdm24xxp/Makefile | 26 | ||||
-rw-r--r-- | wcte11xp.c | 7 | ||||
-rw-r--r-- | wcte12xp/Kbuild (renamed from wcte12xp/Makefile.kernel26) | 4 | ||||
-rw-r--r-- | wcte12xp/Makefile | 26 | ||||
-rw-r--r-- | wcusb.c | 5 | ||||
-rw-r--r-- | zaptel-base.c | 4 | ||||
-rw-r--r-- | ztd-eth.c | 5 | ||||
-rw-r--r-- | ztd-loc.c | 5 | ||||
-rw-r--r-- | ztdummy.c | 8 | ||||
-rw-r--r-- | ztdynamic.c | 7 | ||||
-rw-r--r-- | zttranscode.c | 7 |
27 files changed, 61 insertions, 140 deletions
diff --git a/Makefile.kernel26 b/Kbuild index c00cba7..c00cba7 100644 --- a/Makefile.kernel26 +++ b/Kbuild @@ -78,7 +78,10 @@ MODULESO+=$(SUBDIRS_EXTRA:%=%/) endif # add this later, so it doesn't become part of MODULESO/MODULESKO -MODULES+=wct4xxp wctc4xxp wcte12xp wctdm24xxp +MODULES+=wct4xxp +ifeq ($(BUILDVER),linux26) +MODULES+=wctc4xxp wcte12xp wctdm24xxp +endif ifeq ($(ARCH),i386) ifneq ($(wildcard $(PWD)/hpec/hpec_x86_32.o_shipped),) @@ -221,7 +224,7 @@ utils: $(BINS) libs: $(LIBTONEZONE_SO) ifeq ($(BUILDVER),linux24) -modules: prereq $(MODULESO) wct4xxp/wct4xxp.o wctdm24xxp/wctdm24xxp.o wcte12xp/wcte12xp.o +modules: prereq $(MODULESO) wct4xxp/wct4xxp.o else modules: prereq ifeq (,$(wildcard $(KSRC)/.config)) @@ -458,7 +461,6 @@ ifeq ($(BUILDVER),linux26) else install -d $(DESTDIR)$(MODS_DIR) install -m 644 $(MODULESO) wct4xxp/wct4xxp.o $(DESTDIR)$(MODS_DIR) - install -m 644 $(MODULESO) wctdm24xxp/wctdm24xxp.o $(DESTDIR)$(MODS_DIR) endif ifeq (,$(wildcard wcfxsusb.o)) rm -f $(DESTDIR)$(MODS_DIR)/wcfxsusb.o @@ -52,17 +52,12 @@ With driver: 303826 (1.5 %) #include <linux/interrupt.h> #include <asm/io.h> #include <asm/delay.h> - -#ifdef STANDALONE_ZAPATA -#include "zaptel.h" -#else -#include <linux/zaptel.h> -#endif - #ifdef LINUX26 #include <linux/moduleparam.h> #endif +#include "zaptel.h" + #define RAD_MAX_IFACES 128 #define NUM_CODES 15 @@ -32,15 +32,11 @@ #include <linux/init.h> #include <linux/sched.h> #include <linux/interrupt.h> -#ifdef STANDALONE_ZAPATA -#include "zaptel.h" -#else -#include <linux/zaptel.h> -#endif #ifdef LINUX26 #include <linux/moduleparam.h> #endif #define NEED_PCI_IDS +#include "zaptel.h" #include "tor2-hw.h" #include "tor2fw.h" @@ -31,17 +31,13 @@ #include <linux/interrupt.h> #include <linux/ioport.h> #include <asm/io.h> -#ifdef STANDALONE_ZAPATA -#include "zaptel.h" -#include "torisa.h" -#else -#include <linux/zaptel.h> -#include <linux/torisa.h> -#endif #ifdef LINUX26 #include <linux/moduleparam.h> #endif +#include "zaptel.h" +#include "torisa.h" + /* Board address offsets (specified in word (not byte) offsets) */ #define DDATA 0 /* Data I/O Register */ #define DADDR 0x100 /* Dallas Card Address Reg., 0x200 in byte offset higher */ @@ -32,15 +32,12 @@ #include <linux/errno.h> #include <linux/pci.h> #include <asm/io.h> -#ifdef STANDALONE_ZAPATA -#include "zaptel.h" -#else -#include <linux/zaptel.h> -#endif #ifdef LINUX26 #include <linux/moduleparam.h> #endif +#include "zaptel.h" + /* Uncomment to enable tasklet handling in the FXO driver. Not recommended in general, but may improve interactive performance */ @@ -32,15 +32,12 @@ #include <linux/errno.h> #include <linux/pci.h> #include <linux/spinlock.h> -#ifdef STANDALONE_ZAPATA -#include "zaptel.h" -#else -#include <linux/zaptel.h> -#endif #ifdef LINUX26 #include <linux/moduleparam.h> #endif +#include "zaptel.h" + #define WC_MAX_CARDS 32 /* diff --git a/wct4xxp/Makefile.kernel26 b/wct4xxp/Kbuild index ea6148b..da4ed97 100644 --- a/wct4xxp/Makefile.kernel26 +++ b/wct4xxp/Kbuild @@ -2,6 +2,10 @@ obj-m += wct4xxp.o EXTRA_CFLAGS := -I$(src)/.. $(shell $(src)/../oct612x/octasic-helper cflags $(src)/../oct612x) -Wno-undef +ifeq ($(HOTPLUG_FIRMWARE),yes) + EXTRA_CFLAGS += -DHOTPLUG_FIRMWARE +endif + wct4xxp-objs := base.o vpm450m.o $(shell $(src)/../oct612x/octasic-helper objects ../oct612x) ifneq ($(HOTPLUG_FIRMWARE),yes) diff --git a/wct4xxp/Makefile b/wct4xxp/Makefile index a5faf45..6d7faf0 100644 --- a/wct4xxp/Makefile +++ b/wct4xxp/Makefile @@ -1,6 +1,9 @@ ifneq ($(KBUILD_EXTMOD),) -include $(src)/Makefile.kernel26 +# We only get here on kernels 2.6.0-2.6.8 . +# For newer kernels, Kbuild will be included directly by the kernel +# build system. +-include $(src)/Kbuild else diff --git a/wct4xxp/base.c b/wct4xxp/base.c index f48bc6e..4f8decc 100644 --- a/wct4xxp/base.c +++ b/wct4xxp/base.c @@ -33,15 +33,12 @@ #include <linux/init.h> #include <linux/sched.h> #include <linux/interrupt.h> -#ifdef STANDALONE_ZAPATA -#include "zaptel.h" -#else -#include <linux/zaptel.h> -#endif #ifdef LINUX26 #include <linux/moduleparam.h> #endif +#include "zaptel.h" + #include "wct4xxp.h" #include "vpm450m.h" diff --git a/wct4xxp/vpm450m.h b/wct4xxp/vpm450m.h index bce3a93..41d7c60 100644 --- a/wct4xxp/vpm450m.h +++ b/wct4xxp/vpm450m.h @@ -24,14 +24,7 @@ #ifndef _VPM450M_H #define _VPM450M_H -#ifdef LINUX26 #include <linux/firmware.h> -#else -struct firmware { - size_t size; - u8 *data; -}; -#endif struct vpm450m; diff --git a/wctc4xxp/Makefile.kernel26 b/wctc4xxp/Kbuild index b034819..f7dd663 100644 --- a/wctc4xxp/Makefile.kernel26 +++ b/wctc4xxp/Kbuild @@ -2,6 +2,10 @@ obj-m += wctc4xxp.o EXTRA_CFLAGS := -I$(src)/.. -Wno-undef +ifeq ($(HOTPLUG_FIRMWARE),yes) + EXTRA_CFLAGS += -DHOTPLUG_FIRMWARE +endif + wctc4xxp-objs := base.o ifneq ($(HOTPLUG_FIRMWARE),yes) diff --git a/wctc4xxp/Makefile b/wctc4xxp/Makefile index cad6216..da06c03 100644 --- a/wctc4xxp/Makefile +++ b/wctc4xxp/Makefile @@ -1,8 +1,7 @@ -ifneq ($(KBUILD_EXTMOD),) - -include $(obj)/Makefile.kernel26 - -endif +# We only get here on kernels 2.6.0-2.6.8 . +# For newer kernels, Kbuild will be included directly by the kernel +# build system. +-include $(src)/Kbuild tests: codec_test diff --git a/wctc4xxp/base.c b/wctc4xxp/base.c index dc5be8a..7765df5 100644 --- a/wctc4xxp/base.c +++ b/wctc4xxp/base.c @@ -46,12 +46,8 @@ #ifdef CONFIG_DEVFS_FS #include <linux/devfs_fs_kernel.h> #endif -#ifdef STANDALONE_ZAPATA -#include "zaptel.h" -#else -#include <linux/zaptel.h> -#endif +#include "zaptel.h" /* #define USE_TEST_HW */ #define USE_TDM_CONFIG @@ -201,11 +201,7 @@ static struct fxo_mode { { "YEMEN", 0, 0, 0, 0, 0, 0x3, 0, 0, }, }; -#ifdef STANDALONE_ZAPATA #include "zaptel.h" -#else -#include <linux/zaptel.h> -#endif #ifdef LINUX26 #include <linux/moduleparam.h> diff --git a/wctdm24xxp/Makefile.kernel26 b/wctdm24xxp/Kbuild index 43b641c..24658b9 100644 --- a/wctdm24xxp/Makefile.kernel26 +++ b/wctdm24xxp/Kbuild @@ -2,6 +2,10 @@ obj-m += wctdm24xxp.o EXTRA_CFLAGS := -I$(src)/.. -Wno-undef +ifeq ($(HOTPLUG_FIRMWARE),yes) + EXTRA_CFLAGS += -DHOTPLUG_FIRMWARE +endif + wctdm24xxp-objs := base.o GpakCust.o GpakApi.o ifneq ($(HOTPLUG_FIRMWARE),yes) diff --git a/wctdm24xxp/Makefile b/wctdm24xxp/Makefile index 9927928..442555a 100644 --- a/wctdm24xxp/Makefile +++ b/wctdm24xxp/Makefile @@ -1,22 +1,4 @@ -ifneq ($(KBUILD_EXTMOD),) - -include $(src)/Makefile.kernel26 - -else - -all: wctdm24xxp.o - -%.o: %.c - $(CC) $(KFLAGS) -o $@ -c $< - -base.o: ../zaptel.h GpakCust.h ../wctdm.h - -GpakCust.o: GpakCust.h - -wctdm24xxp.o: base.o GpakCust.o GpakApi.o - $(LD) -r -o $@ $^ - -clean: - rm -f *.o - -endif +# We only get here on kernels 2.6.0-2.6.8 . +# For newer kernels, Kbuild will be included directly by the kernel +# build system. +-include $(src)/Kbuild @@ -34,15 +34,12 @@ #include <linux/errno.h> #include <linux/pci.h> #include <linux/spinlock.h> -#ifdef STANDALONE_ZAPATA -#include "zaptel.h" -#else -#include <linux/zaptel.h> -#endif #ifdef LINUX26 #include <linux/moduleparam.h> #endif +#include "zaptel.h" + /* XXX: fix this */ #include "wct4xxp/wct4xxp.h" /* For certain definitions */ diff --git a/wcte12xp/Makefile.kernel26 b/wcte12xp/Kbuild index c41e8f1..15530ce 100644 --- a/wcte12xp/Makefile.kernel26 +++ b/wcte12xp/Kbuild @@ -2,6 +2,10 @@ obj-m += wcte12xp.o EXTRA_CFLAGS := -I$(src)/.. -Wno-undef +ifeq ($(HOTPLUG_FIRMWARE),yes) + EXTRA_CFLAGS += -DHOTPLUG_FIRMWARE +endif + wcte12xp-objs := base.o vpmadt032.o GpakApi.o ifneq ($(HOTPLUG_FIRMWARE),yes) diff --git a/wcte12xp/Makefile b/wcte12xp/Makefile index 026252d..442555a 100644 --- a/wcte12xp/Makefile +++ b/wcte12xp/Makefile @@ -1,22 +1,4 @@ -ifneq ($(KBUILD_EXTMOD),) - -include $(obj)/Makefile.kernel26 - -else - -all: wcte12xp.o - -%.o: %.c - $(CC) $(KFLAGS) -o $@ -c $< - -base.o: ../zaptel.h ../wct4xxp/wct4xxp.h vpmadt032.h - -vpmadt032.o: vpmadt032.h - -wcte12xp.o: base.o vpmadt032.o GpakApi.o - $(LD) -r -o $@ $^ - -clean: - rm -rf *.o - -endif +# We only get here on kernels 2.6.0-2.6.8 . +# For newer kernels, Kbuild will be included directly by the kernel +# build system. +-include $(src)/Kbuild @@ -44,12 +44,7 @@ #define USB2420 #endif -#ifdef STANDALONE_ZAPATA - #include "zaptel.h" -#else -#include <linux/zaptel.h> -#endif /* STANDALONE_ZAPATA */ #include "wcusb.h" #include "proslic.h" diff --git a/zaptel-base.c b/zaptel-base.c index 90d27da..94843b9 100644 --- a/zaptel-base.c +++ b/zaptel-base.c @@ -78,11 +78,7 @@ #define FAST_HDLC_NEED_TABLES #include "fasthdlc.h" -#ifdef STANDALONE_ZAPATA #include "zaptel.h" -#else -#include <linux/zaptel.h> -#endif #ifdef LINUX26 #include <linux/moduleparam.h> @@ -36,11 +36,8 @@ #ifdef CONFIG_DEVFS_FS #include <linux/devfs_fs_kernel.h> #endif -#ifdef STANDALONE_ZAPATA + #include "zaptel.h" -#else -#include <linux/zaptel.h> -#endif #define ETH_P_ZTDETH 0xd00d @@ -60,11 +60,8 @@ #ifdef CONFIG_DEVFS_FS #include <linux/devfs_fs_kernel.h> #endif -#ifdef STANDALONE_ZAPATA + #include "zaptel.h" -#else -#include <linux/zaptel.h> -#endif #ifdef DEFINE_SPINLOCK static DEFINE_SPINLOCK(zlock); @@ -74,11 +74,7 @@ #include <linux/module.h> #include <linux/init.h> #include <linux/errno.h> -#ifdef STANDALONE_ZAPATA -#include "zaptel.h" -#else -#include <linux/zaptel.h> -#endif + #ifndef LINUX26 #include <linux/usb.h> #include <linux/pci.h> @@ -93,6 +89,8 @@ #endif #include <linux/moduleparam.h> #endif + +#include "zaptel.h" #include "ztdummy.h" diff --git a/ztdynamic.c b/ztdynamic.c index 5147cf0..41b8382 100644 --- a/ztdynamic.c +++ b/ztdynamic.c @@ -36,15 +36,12 @@ #ifdef CONFIG_DEVFS_FS #include <linux/devfs_fs_kernel.h> #endif -#ifdef STANDALONE_ZAPATA -#include "zaptel.h" -#else -#include <linux/zaptel.h> -#endif #ifdef LINUX26 #include <linux/moduleparam.h> #endif +#include "zaptel.h" + /* * Tasklets provide better system interactive response at the cost of the * possibility of losing a frame of data at very infrequent intervals. If diff --git a/zttranscode.c b/zttranscode.c index cf99b8a..ea3ac30 100644 --- a/zttranscode.c +++ b/zttranscode.c @@ -39,15 +39,12 @@ #ifdef CONFIG_DEVFS_FS #include <linux/devfs_fs_kernel.h> #endif -#ifdef STANDALONE_ZAPATA -#include "zaptel.h" -#else -#include <linux/zaptel.h> -#endif #ifdef LINUX26 #include <linux/moduleparam.h> #endif +#include "zaptel.h" + static int debug = 0; static struct zt_transcoder *trans; static spinlock_t translock = SPIN_LOCK_UNLOCKED; |