summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2007-01-23 15:32:03 +0000
committerkpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2007-01-23 15:32:03 +0000
commit39d34cf50e3dd65ba61c579b77495311c6737e43 (patch)
tree830a32650b7a7f2ea36ad8acc3b3e9528b0f26ac
parent32474245aaab39b88fd2ff7b03356bedbb0ad3ac (diff)
Merged revisions 1921 via svnmerge from
https://origsvn.digium.com/svn/zaptel/branches/1.4 ................ r1921 | kpfleming | 2007-01-23 09:29:28 -0600 (Tue, 23 Jan 2007) | 10 lines Merged revisions 1920 via svnmerge from https://origsvn.digium.com/svn/zaptel/branches/1.2 ........ r1920 | kpfleming | 2007-01-23 09:25:42 -0600 (Tue, 23 Jan 2007) | 2 lines clean up various compiler warnings ........ ................ git-svn-id: http://svn.digium.com/svn/zaptel/trunk@1922 5390a7c7-147a-4af0-8ec9-7488f05a26cb
-rw-r--r--pciradio.c10
-rw-r--r--torisa.c11
-rw-r--r--wctdm.c6
-rw-r--r--wctdm24xxp.c8
-rw-r--r--xpp/xpp_zap.c2
-rw-r--r--zaptel.c6
6 files changed, 26 insertions, 17 deletions
diff --git a/pciradio.c b/pciradio.c
index 10ea7b2..ff423a9 100644
--- a/pciradio.c
+++ b/pciradio.c
@@ -169,8 +169,8 @@ struct pciradio {
volatile unsigned long ioaddr;
dma_addr_t readdma;
dma_addr_t writedma;
- volatile int *writechunk; /* Double-word aligned write memory */
- volatile int *readchunk; /* Double-word aligned read memory */
+ volatile unsigned int *writechunk; /* Double-word aligned write memory */
+ volatile unsigned int *readchunk; /* Double-word aligned read memory */
unsigned char saudio_status[NUM_CHANS];
char gotcor[NUM_CHANS];
char gotct[NUM_CHANS];
@@ -539,7 +539,7 @@ unsigned long flags;
static void _do_encdec(struct pciradio *rad)
{
int i,n;
-unsigned char byte1,byte2;
+unsigned char byte1 = 0, byte2 = 0;
/* return doing nothing if busy */
if ((rad->encdec.lastcmd + 2) > jiffies) return;
@@ -1258,7 +1258,7 @@ static int pciradio_ioctl(struct zt_chan *chan, unsigned int cmd, unsigned long
if ((rad->rxindex < stack.p.data) &&
(rad->srxtimer < SRX_TIMEOUT) &&
((rad->remmode[chan->chanpos - 1] == ZT_RADPAR_REM_SERIAL) ||
- (!strchr(rad->rxbuf,'\r'))))
+ (!strchr((char *) rad->rxbuf,'\r'))))
{
spin_unlock_irqrestore(&rad->lock,flags);
interruptible_sleep_on_timeout(&mywait,2);
@@ -1660,7 +1660,7 @@ static int __devinit pciradio_init_one(struct pci_dev *pdev, const struct pci_de
/* Allocate enough memory for two zt chunks, receive and transmit. Each sample uses
32 bits. Allocate an extra set just for control too */
- rad->writechunk = (int *)pci_alloc_consistent(pdev, ZT_MAX_CHUNKSIZE * 2 * 2 * 2 * 4, &rad->writedma);
+ rad->writechunk = pci_alloc_consistent(pdev, ZT_MAX_CHUNKSIZE * 2 * 2 * 2 * 4, &rad->writedma);
if (!rad->writechunk) {
printk("pciradio: Unable to allocate DMA-able memory\n");
if (rad->freeregion)
diff --git a/torisa.c b/torisa.c
index d6f7c78..1492732 100644
--- a/torisa.c
+++ b/torisa.c
@@ -1136,6 +1136,17 @@ static int __init tor_init(void)
return 0;
}
+
+#if !defined(LINUX26)
+static int __init set_tor_base(char *str)
+{
+ base = simple_strtol(str, NULL, 0);
+ return 1;
+}
+
+__setup("tor=", set_tor_base);
+#endif
+
static void __exit tor_exit(void)
{
free_irq(irq, NULL);
diff --git a/wctdm.c b/wctdm.c
index 4e500e1..c8afeb8 100644
--- a/wctdm.c
+++ b/wctdm.c
@@ -345,8 +345,8 @@ struct wctdm {
unsigned long ioaddr;
dma_addr_t readdma;
dma_addr_t writedma;
- volatile int *writechunk; /* Double-word aligned write memory */
- volatile int *readchunk; /* Double-word aligned read memory */
+ volatile unsigned int *writechunk; /* Double-word aligned write memory */
+ volatile unsigned int *readchunk; /* Double-word aligned read memory */
struct zt_chan chans[NUM_CARDS];
};
@@ -2281,7 +2281,7 @@ static int __devinit wctdm_init_one(struct pci_dev *pdev, const struct pci_devic
/* Allocate enough memory for two zt chunks, receive and transmit. Each sample uses
32 bits. Allocate an extra set just for control too */
- wc->writechunk = (int *)pci_alloc_consistent(pdev, ZT_MAX_CHUNKSIZE * 2 * 2 * 2 * 4, &wc->writedma);
+ wc->writechunk = pci_alloc_consistent(pdev, ZT_MAX_CHUNKSIZE * 2 * 2 * 2 * 4, &wc->writedma);
if (!wc->writechunk) {
printk("wctdm: Unable to allocate DMA-able memory\n");
if (wc->freeregion)
diff --git a/wctdm24xxp.c b/wctdm24xxp.c
index 949abaa..49ad8b6 100644
--- a/wctdm24xxp.c
+++ b/wctdm24xxp.c
@@ -423,7 +423,6 @@ static int battdebounce = DEFAULT_BATT_DEBOUNCE;
static int battthresh = DEFAULT_BATT_THRESH;
static int debug = 0;
static int robust = 0;
-static int timingonly = 0;
static int lowpower = 0;
static int boostringer = 0;
static int fastringer = 0;
@@ -440,7 +439,6 @@ static int nativebridge = 1;
#ifdef VPM_SUPPORT
static int vpmsupport = 1;
static int vpmdtmfsupport = 0;
-static int vpmspans = 4;
#define VPM_DEFAULT_DTMFTHRESHOLD 1250
static int dtmfthreshold = VPM_DEFAULT_DTMFTHRESHOLD;
#endif
@@ -3326,7 +3324,7 @@ static int __devinit wctdm_init_one(struct pci_dev *pdev, const struct pci_devic
/* Allocate enough memory for two zt chunks, receive and transmit. Each sample uses
32 bits. Allocate an extra set just for control too */
- wc->writechunk = (int *)pci_alloc_consistent(pdev, PCI_WINDOW_SIZE, &wc->writedma);
+ wc->writechunk = pci_alloc_consistent(pdev, PCI_WINDOW_SIZE, &wc->writedma);
if (!wc->writechunk) {
printk("wctdm: Unable to allocate DMA-able memory\n");
if (wc->freeregion)
@@ -3500,7 +3498,6 @@ module_param(loopcurrent, int, 0600);
module_param(robust, int, 0600);
module_param(_opermode, int, 0600);
module_param(opermode, charp, 0600);
-module_param(timingonly, int, 0600);
module_param(lowpower, int, 0600);
module_param(boostringer, int, 0600);
module_param(fastringer, int, 0600);
@@ -3516,7 +3513,6 @@ module_param(fxsrxgain, int, 0600);
#ifdef VPM_SUPPORT
module_param(vpmsupport, int, 0600);
module_param(vpmdtmfsupport, int, 0600);
-module_param(vpmspans, int, 0600);
module_param(dtmfthreshold, int, 0600);
#endif
#else
@@ -3525,7 +3521,6 @@ MODULE_PARM(loopcurrent, "i");
MODULE_PARM(robust, "i");
MODULE_PARM(_opermode, "i");
MODULE_PARM(opermode, "s");
-MODULE_PARM(timingonly, "i");
MODULE_PARM(lowpower, "i");
MODULE_PARM(boostringer, "i");
MODULE_PARM(fastringer, "i");
@@ -3541,7 +3536,6 @@ MODULE_PARM(fxsrxgain, "i");
#ifdef VPM_SUPPORT
MODULE_PARM(vpmsupport, "i");
MODULE_PARM(vpmdtmfsupport, "i");
-MODULE_PARM(vpmspans, "i");
MODULE_PARM(dtmfthreshold, "i");
#endif
#endif
diff --git a/xpp/xpp_zap.c b/xpp/xpp_zap.c
index b73232d..f7ce8d1 100644
--- a/xpp/xpp_zap.c
+++ b/xpp/xpp_zap.c
@@ -433,7 +433,9 @@ static int xpd_read_proc(char *page, char **start, off_t off, int count, int *eo
len += sprintf(page + len, "\nzaptel state: %s RUNNING\n", (xpd->span.flags & ZT_FLAG_RUNNING)?"IS":"IS NOT");
len += sprintf(page + len, "\nPCM:\n | [readchunk] | [writechunk] | delay");
for_each_line(xpd, i) {
+#if 0
struct zt_chan *chans = xpd->span.chans;
+#endif
byte rchunk[ZT_CHUNKSIZE];
byte wchunk[ZT_CHUNKSIZE];
byte *rp;
diff --git a/zaptel.c b/zaptel.c
index 253607b..f8cf888 100644
--- a/zaptel.c
+++ b/zaptel.c
@@ -222,7 +222,8 @@ static struct class_simple *zap_class = NULL;
static int deftaps = 64;
-static
+#if !defined(LINUX26)
+static
__u16 fcstab[256] =
{
0x0000, 0x1189, 0x2312, 0x329b, 0x4624, 0x57ad, 0x6536, 0x74bf,
@@ -258,6 +259,7 @@ __u16 fcstab[256] =
0xf78f, 0xe606, 0xd49d, 0xc514, 0xb1ab, 0xa022, 0x92b9, 0x8330,
0x7bc7, 0x6a4e, 0x58d5, 0x495c, 0x3de3, 0x2c6a, 0x1ef1, 0x0f78
};
+#endif
static int debug;
@@ -6595,7 +6597,7 @@ static void __zt_getempty(struct zt_chan *ms, unsigned char *buf)
static void __zt_receive_chunk(struct zt_chan *chan, unsigned char *buf)
{
/* Receive chunk of audio -- called with chan->lock held */
- char waste[ZT_CHUNKSIZE];
+ unsigned char waste[ZT_CHUNKSIZE];
if (!buf) {
memset(waste, ZT_LIN2X(0, chan), sizeof(waste));