summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fxotune.c1
-rw-r--r--fxstest.c1
-rw-r--r--hdlcstress.c2
-rw-r--r--hdlctest.c2
-rw-r--r--patgen.c2
-rw-r--r--patlooptest.c2
-rw-r--r--pattest.c2
-rw-r--r--timertest.c1
-rw-r--r--tonezone.c1
-rw-r--r--torisatool.c1
-rw-r--r--usbfxstest.c1
-rw-r--r--wctc4xxp/codec_test.c1
-rw-r--r--zaptel.c1
-rw-r--r--zaptel.h57
-rw-r--r--zonedata.c1
-rw-r--r--ztcfg.c1
-rw-r--r--ztd-eth.c1
-rw-r--r--ztd-loc.c1
-rw-r--r--ztdiag.c1
-rw-r--r--ztdummy.c1
-rw-r--r--ztdynamic.c1
-rw-r--r--ztmonitor.c1
-rw-r--r--zttool.c1
-rw-r--r--zttranscode.c1
24 files changed, 30 insertions, 55 deletions
diff --git a/fxotune.c b/fxotune.c
index 94d0912..c5db4d1 100644
--- a/fxotune.c
+++ b/fxotune.c
@@ -22,7 +22,6 @@
#include <fcntl.h>
#include <math.h>
-#include <linux/types.h>
#ifdef STANDALONE_ZAPATA
#include "zaptel.h"
#else
diff --git a/fxstest.c b/fxstest.c
index 820ae3f..922a1a9 100644
--- a/fxstest.c
+++ b/fxstest.c
@@ -5,7 +5,6 @@
#include <stdlib.h>
#include <unistd.h>
#include <sys/ioctl.h>
-#include <linux/types.h>
#include "zaptel.h"
#include "tonezone.h"
#include "wctdm.h"
diff --git a/hdlcstress.c b/hdlcstress.c
index 3d3d942..70505a2 100644
--- a/hdlcstress.c
+++ b/hdlcstress.c
@@ -2,10 +2,8 @@
#include <fcntl.h>
#include <string.h>
#include <errno.h>
-#include <linux/types.h>
#include <linux/zaptel.h>
#include <stdio.h>
-#include <linux/types.h>
#include <linux/ppp_defs.h>
#include <sys/ioctl.h>
#include <unistd.h>
diff --git a/hdlctest.c b/hdlctest.c
index fd74bbb..d67a552 100644
--- a/hdlctest.c
+++ b/hdlctest.c
@@ -2,10 +2,8 @@
#include <fcntl.h>
#include <string.h>
#include <errno.h>
-#include <linux/types.h>
#include <linux/zaptel.h>
#include <stdio.h>
-#include <linux/types.h>
#include <linux/ppp_defs.h>
#include <sys/ioctl.h>
#include <unistd.h>
diff --git a/patgen.c b/patgen.c
index 38d199c..e72b0ed 100644
--- a/patgen.c
+++ b/patgen.c
@@ -3,14 +3,12 @@
#include <string.h>
#include <errno.h>
#include <stdio.h>
-#include <linux/types.h>
#include <linux/ppp_defs.h>
#include <sys/ioctl.h>
#include <unistd.h>
#include <stdlib.h>
#include "bittest.h"
-#include <linux/types.h>
#ifdef STANDALONE_ZAPATA
#include "zaptel.h"
#else
diff --git a/patlooptest.c b/patlooptest.c
index 51bec00..709c1a2 100644
--- a/patlooptest.c
+++ b/patlooptest.c
@@ -3,14 +3,12 @@
#include <string.h>
#include <errno.h>
#include <stdio.h>
-#include <linux/types.h>
#include <linux/ppp_defs.h>
#include <sys/ioctl.h>
#include <unistd.h>
#include <stdlib.h>
#include <time.h>
-#include <linux/types.h>
#ifdef STANDALONE_ZAPATA
#include "zaptel.h"
#else
diff --git a/pattest.c b/pattest.c
index a25d265..8bc64aa 100644
--- a/pattest.c
+++ b/pattest.c
@@ -3,14 +3,12 @@
#include <string.h>
#include <errno.h>
#include <stdio.h>
-#include <linux/types.h>
#include <linux/ppp_defs.h>
#include <sys/ioctl.h>
#include <unistd.h>
#include <stdlib.h>
#include "bittest.h"
-#include <linux/types.h>
#ifdef STANDALONE_ZAPATA
#include "zaptel.h"
#else
diff --git a/timertest.c b/timertest.c
index fd213e5..df224b2 100644
--- a/timertest.c
+++ b/timertest.c
@@ -8,7 +8,6 @@
#include <sys/time.h>
#include <errno.h>
-#include <linux/types.h>
#ifdef STANDALONE_ZAPATA
#include "zaptel.h"
#else
diff --git a/tonezone.c b/tonezone.c
index cb8754a..deb1ac1 100644
--- a/tonezone.c
+++ b/tonezone.c
@@ -29,7 +29,6 @@
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
-#include <linux/types.h>
#include "tonezone.h"
#define DEFAULT_ZT_DEV "/dev/zap/ctl"
diff --git a/torisatool.c b/torisatool.c
index 75d54c7..43dc7a9 100644
--- a/torisatool.c
+++ b/torisatool.c
@@ -28,7 +28,6 @@
#include <sys/ioctl.h>
#include <string.h>
#include <errno.h>
-#include <linux/types.h>
#include "zaptel.h"
#include "torisa.h"
diff --git a/usbfxstest.c b/usbfxstest.c
index 45c9b93..23cd680 100644
--- a/usbfxstest.c
+++ b/usbfxstest.c
@@ -6,7 +6,6 @@
#include <unistd.h>
#include <sys/ioctl.h>
#include "zap.h"
-#include <linux/types.h>
#include <linux/zaptel.h>
int main(int argc, char *argv[])
diff --git a/wctc4xxp/codec_test.c b/wctc4xxp/codec_test.c
index 5cef93e..4117007 100644
--- a/wctc4xxp/codec_test.c
+++ b/wctc4xxp/codec_test.c
@@ -35,7 +35,6 @@
#include <errno.h>
#include <sys/mman.h>
#include <unistd.h>
-#include <linux/types.h>
#ifdef STANDALONE_ZAPATA
#include "../zaptel.h"
#else
diff --git a/zaptel.c b/zaptel.c
index 0625e2e..fc1bd35 100644
--- a/zaptel.c
+++ b/zaptel.c
@@ -79,7 +79,6 @@
#define FAST_HDLC_NEED_TABLES
#include "fasthdlc.h"
-#include <linux/types.h>
#ifdef STANDALONE_ZAPATA
#include "zaptel.h"
#else
diff --git a/zaptel.h b/zaptel.h
index fefad1f..327cc28 100644
--- a/zaptel.h
+++ b/zaptel.h
@@ -30,20 +30,26 @@
#ifndef _LINUX_ZAPTEL_H
#define _LINUX_ZAPTEL_H
+#include <linux/types.h>
+
#ifdef __KERNEL__
#include "zconfig.h"
#include <linux/version.h>
+
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)
#include <linux/config.h>
#endif
+
#ifdef CONFIG_ZAPATA_NET
#include <linux/hdlc.h>
#endif
+
#ifdef CONFIG_ZAPATA_PPP
#include <linux/ppp_channel.h>
#include <linux/skbuff.h>
#include <linux/interrupt.h>
#endif
+
#include <linux/fs.h>
#include <linux/list.h>
@@ -69,7 +75,8 @@
#include "ecdis.h"
#include "fasthdlc.h"
-#endif
+#endif /* __KERNEL__ */
+
#ifdef CONFIG_DEVFS_FS
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
#include <linux/devfs_fs_kernel.h>
@@ -789,9 +796,6 @@ struct zt_tone_def { /* Structure for zone programming */
};
-#ifdef __KERNEL__
-#endif /* KERNEL */
-
/* Define the maximum block size */
#define ZT_MAX_BLOCKSIZE 8192
@@ -991,8 +995,6 @@ struct zt_tone_def { /* Structure for zone programming */
#endif
#ifdef __KERNEL__
-
-#include <linux/types.h>
#include <linux/poll.h>
#define ZT_MAX_EVENTSIZE 64 /* 64 events max in buffer */
@@ -1019,7 +1021,8 @@ struct zt_hdlc {
#endif
struct zt_chan *chan;
};
-#endif
+
+#endif /* CONFIG_ZAPATA_NET */
/* Conference queue stucture */
struct confq {
@@ -1451,24 +1454,24 @@ struct zt_dynamic_driver {
};
/* Receive a dynamic span message */
-extern void zt_dynamic_receive(struct zt_span *span, unsigned char *msg, int msglen);
+void zt_dynamic_receive(struct zt_span *span, unsigned char *msg, int msglen);
/* Register a dynamic driver */
-extern int zt_dynamic_register(struct zt_dynamic_driver *driver);
+int zt_dynamic_register(struct zt_dynamic_driver *driver);
/* Unregister a dynamic driver */
-extern void zt_dynamic_unregister(struct zt_dynamic_driver *driver);
+void zt_dynamic_unregister(struct zt_dynamic_driver *driver);
/* Receive on a span. The zaptel interface will handle all the calculations for
all member channels of the span, pulling the data from the readchunk buffer */
-extern int zt_receive(struct zt_span *span);
+int zt_receive(struct zt_span *span);
/* Prepare writechunk buffers on all channels for this span */
-extern int zt_transmit(struct zt_span *span);
+int zt_transmit(struct zt_span *span);
/* Register a span. Returns 0 on success, -1 on failure. Pref-master is non-zero if
we should have preference in being the master device */
-extern int zt_register(struct zt_span *span, int prefmaster);
+int zt_register(struct zt_span *span, int prefmaster);
/* Allocate / free memory for a transcoder */
struct zt_transcoder *zt_transcoder_alloc(int numchans);
@@ -1485,32 +1488,32 @@ int zt_transcoder_alert(struct zt_transcoder_channel *ztc);
/* Unregister a span */
-extern int zt_unregister(struct zt_span *span);
+int zt_unregister(struct zt_span *span);
/* Gives a name to an LBO */
-extern char *zt_lboname(int lbo);
+char *zt_lboname(int lbo);
/* Tell Zaptel about changes in received rbs bits */
-extern void zt_rbsbits(struct zt_chan *chan, int bits);
+void zt_rbsbits(struct zt_chan *chan, int bits);
/* Tell Zaptel abou changes in received signalling */
-extern void zt_hooksig(struct zt_chan *chan, zt_rxsig_t rxsig);
+void zt_hooksig(struct zt_chan *chan, zt_rxsig_t rxsig);
/* Queue an event on a channel */
-extern void zt_qevent_nolock(struct zt_chan *chan, int event);
+void zt_qevent_nolock(struct zt_chan *chan, int event);
/* Queue an event on a channel, locking it first */
-extern void zt_qevent_lock(struct zt_chan *chan, int event);
+void zt_qevent_lock(struct zt_chan *chan, int event);
/* Notify a change possible change in alarm status */
-extern void zt_alarm_notify(struct zt_span *span);
+void zt_alarm_notify(struct zt_span *span);
/* Initialize a tone state */
-extern void zt_init_tone_state(struct zt_tone_state *ts, struct zt_tone *zt);
+void zt_init_tone_state(struct zt_tone_state *ts, struct zt_tone *zt);
/* Get a given DTMF or MF tone struct, suitable for zt_tone_nextsample.
Set 'mf' to 0 for DTMF or 1 for MFv1 */
-extern struct zt_tone *zt_dtmf_tone(char digit, int mf);
+struct zt_tone *zt_dtmf_tone(char digit, int mf);
/* Echo cancel a receive and transmit chunk for a given channel. This
should be called by the low-level driver as close to the interface
@@ -1518,8 +1521,8 @@ extern struct zt_tone *zt_dtmf_tone(char digit, int mf);
AT THE ZAPTEL LEVEL. zt_ec_chunk will not echo cancel if it should
not be doing so. rxchunk is modified in-place */
-extern void zt_ec_chunk(struct zt_chan *chan, unsigned char *rxchunk, const unsigned char *txchunk);
-extern void zt_ec_span(struct zt_span *span);
+void zt_ec_chunk(struct zt_chan *chan, unsigned char *rxchunk, const unsigned char *txchunk);
+void zt_ec_span(struct zt_span *span);
extern struct file_operations *zt_transcode_fops;
@@ -1528,15 +1531,15 @@ extern struct file_operations *zt_transcode_fops;
extern short __zt_mulaw[256];
extern short __zt_alaw[256];
#ifdef CONFIG_CALC_XLAW
-extern u_char __zt_lineartoulaw(short a);
-extern u_char __zt_lineartoalaw(short a);
+u_char __zt_lineartoulaw(short a);
+u_char __zt_lineartoalaw(short a);
#else
extern u_char __zt_lin2mu[16384];
extern u_char __zt_lin2a[16384];
#endif
/* Used by dynamic zaptel -- don't use directly */
-extern void zt_set_dynamic_ioctl(int (*func)(unsigned int cmd, unsigned long data));
+void zt_set_dynamic_ioctl(int (*func)(unsigned int cmd, unsigned long data));
/* Used privately by zaptel. Avoid touching directly */
struct zt_tone {
diff --git a/zonedata.c b/zonedata.c
index 0d57f87..dbfef0d 100644
--- a/zonedata.c
+++ b/zonedata.c
@@ -23,7 +23,6 @@
* UK information from BT SIN 350 Issue 1.1
* Helpful reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf
*/
-#include <linux/types.h>
#include "tonezone.h"
struct tone_zone builtin_zones[] =
diff --git a/ztcfg.c b/ztcfg.c
index ec1fdf6..ae03547 100644
--- a/ztcfg.c
+++ b/ztcfg.c
@@ -38,7 +38,6 @@
#include <fcntl.h>
#include <errno.h>
#include "ztcfg.h"
-#include <linux/types.h>
#include "tonezone.h"
#include "zaptel.h"
diff --git a/ztd-eth.c b/ztd-eth.c
index 8dec7a2..26737b9 100644
--- a/ztd-eth.c
+++ b/ztd-eth.c
@@ -36,7 +36,6 @@
#ifdef CONFIG_DEVFS_FS
#include <linux/devfs_fs_kernel.h>
#endif
-#include <linux/types.h>
#ifdef STANDALONE_ZAPATA
#include "zaptel.h"
#else
diff --git a/ztd-loc.c b/ztd-loc.c
index ff9ba73..100bd9f 100644
--- a/ztd-loc.c
+++ b/ztd-loc.c
@@ -60,7 +60,6 @@
#ifdef CONFIG_DEVFS_FS
#include <linux/devfs_fs_kernel.h>
#endif
-#include <linux/types.h>
#ifdef STANDALONE_ZAPATA
#include "zaptel.h"
#else
diff --git a/ztdiag.c b/ztdiag.c
index 864f19a..e2be5f3 100644
--- a/ztdiag.c
+++ b/ztdiag.c
@@ -4,7 +4,6 @@
#include <stdlib.h>
#include <unistd.h>
-#include <linux/types.h>
#ifdef STANDALONE_ZAPATA
#include "zaptel.h"
#else
diff --git a/ztdummy.c b/ztdummy.c
index 0b2c111..df2f19b 100644
--- a/ztdummy.c
+++ b/ztdummy.c
@@ -59,7 +59,6 @@
#include <linux/module.h>
#include <linux/init.h>
#include <linux/errno.h>
-#include <linux/types.h>
#ifdef STANDALONE_ZAPATA
#include "zaptel.h"
#else
diff --git a/ztdynamic.c b/ztdynamic.c
index df68b5a..825f6ee 100644
--- a/ztdynamic.c
+++ b/ztdynamic.c
@@ -36,7 +36,6 @@
#ifdef CONFIG_DEVFS_FS
#include <linux/devfs_fs_kernel.h>
#endif
-#include <linux/types.h>
#ifdef STANDALONE_ZAPATA
#include "zaptel.h"
#else
diff --git a/ztmonitor.c b/ztmonitor.c
index be307d7..6098b66 100644
--- a/ztmonitor.c
+++ b/ztmonitor.c
@@ -38,7 +38,6 @@
#include <sys/time.h>
#include <fcntl.h>
#include <errno.h>
-#include <linux/types.h>
#ifdef STANDALONE_ZAPATA
#include "zaptel.h"
#include "tonezone.h"
diff --git a/zttool.c b/zttool.c
index 34b8f79..2a3cb34 100644
--- a/zttool.c
+++ b/zttool.c
@@ -38,7 +38,6 @@
#include <fcntl.h>
#include <errno.h>
#include <newt.h>
-#include <linux/types.h>
#ifdef STANDALONE_ZAPATA
#include "zaptel.h"
#include "tonezone.h"
diff --git a/zttranscode.c b/zttranscode.c
index 60ff0ca..aad71cc 100644
--- a/zttranscode.c
+++ b/zttranscode.c
@@ -34,7 +34,6 @@
#include <linux/interrupt.h>
#include <linux/vmalloc.h>
#include <asm/io.h>
-#include <linux/types.h>
#ifdef CONFIG_DEVFS_FS
#include <linux/devfs_fs_kernel.h>
#endif