summaryrefslogtreecommitdiff
path: root/drivers/dahdi/wcte12xp
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/dahdi/wcte12xp')
-rw-r--r--drivers/dahdi/wcte12xp/GpakApi.c2
-rw-r--r--drivers/dahdi/wcte12xp/base.c14
-rw-r--r--drivers/dahdi/wcte12xp/vpmadt032.c31
-rw-r--r--drivers/dahdi/wcte12xp/vpmadt032.h4
4 files changed, 23 insertions, 28 deletions
diff --git a/drivers/dahdi/wcte12xp/GpakApi.c b/drivers/dahdi/wcte12xp/GpakApi.c
index bcba139..748cc94 100644
--- a/drivers/dahdi/wcte12xp/GpakApi.c
+++ b/drivers/dahdi/wcte12xp/GpakApi.c
@@ -1249,7 +1249,7 @@ gpakReadFramingStatsStatus_t gpakReadFramingStats(
*pFramingError3Count = ReadBuffer[2];
*pDmaStopErrorCount = ReadBuffer[3];
- if(pDmaSlipStatsBuffer != 0)
+ if(pDmaSlipStatsBuffer != NULL)
// If users want to get the DMA slips count
{
pDmaSlipStatsBuffer[0] = ReadBuffer[4];
diff --git a/drivers/dahdi/wcte12xp/base.c b/drivers/dahdi/wcte12xp/base.c
index ee65acc..6ed6abf 100644
--- a/drivers/dahdi/wcte12xp/base.c
+++ b/drivers/dahdi/wcte12xp/base.c
@@ -91,7 +91,7 @@ static int latency = VOICEBUS_DEFAULT_LATENCY;
#ifdef VPM_SUPPORT
int vpmsupport = 1;
int vpmdtmfsupport = 0;
-int vpmtsisupport = 0;
+static int vpmtsisupport = 0;
int vpmnlptype = 1;
int vpmnlpthresh = 24;
int vpmnlpmaxsupp = 0;
@@ -1018,7 +1018,7 @@ static int t1xxp_ioctl(struct dahdi_chan *chan, unsigned int cmd, unsigned long
break;
#ifdef VPM_SUPPORT
case DAHDI_TONEDETECT:
- if (get_user(x, (int *) data))
+ if (get_user(x, (__user int *) data))
return -EFAULT;
if (!wc->vpm150m)
return -ENOSYS;
@@ -1714,12 +1714,10 @@ static struct pci_device_id te12xp_pci_tbl[] = {
MODULE_DEVICE_TABLE(pci, te12xp_pci_tbl);
struct pci_driver te12xp_driver = {
- name: "wcte12xp",
- probe: te12xp_init_one,
- remove: __devexit_p(te12xp_remove_one),
- suspend: NULL,
- resume: NULL,
- id_table: te12xp_pci_tbl,
+ .name = "wcte12xp",
+ .probe = te12xp_init_one,
+ .remove = __devexit_p(te12xp_remove_one),
+ .id_table = te12xp_pci_tbl,
};
static int __init te12xp_init(void)
diff --git a/drivers/dahdi/wcte12xp/vpmadt032.c b/drivers/dahdi/wcte12xp/vpmadt032.c
index 9040505..1df5415 100644
--- a/drivers/dahdi/wcte12xp/vpmadt032.c
+++ b/drivers/dahdi/wcte12xp/vpmadt032.c
@@ -46,12 +46,6 @@
#include "vpmadt032.h"
#include "GpakApi.h"
-extern struct t1 *ifaces[WC_MAX_IFACES];
-
-extern int vpmnlptype;
-extern int vpmnlpthresh;
-extern int vpmnlpmaxsupp;
-
#ifdef VPM_SUPPORT
inline void vpm150m_cmd_dequeue(struct t1 *wc, volatile unsigned char *writechunk, int whichframe)
@@ -317,8 +311,8 @@ static inline int vpm150m_io_wait(struct t1 *wc)
return ret;
}
-int t1_vpm150m_getreg_full_async(struct t1 *wc, int pagechange, unsigned int len,
- unsigned short addr, unsigned short *outbuf, struct vpm150m_cmd **hit_p)
+static int t1_vpm150m_getreg_full_async(struct t1 *wc, int pagechange, unsigned int len,
+ unsigned short addr, unsigned short *outbuf, struct vpm150m_cmd **hit_p)
{
int ret=0;
unsigned long flags;
@@ -341,8 +335,8 @@ int t1_vpm150m_getreg_full_async(struct t1 *wc, int pagechange, unsigned int len
return ret;
}
-int t1_vpm150m_getreg_full_return(struct t1 *wc, int pagechange, unsigned int len,
- unsigned short addr, unsigned short *outbuf, struct vpm150m_cmd **hit_p)
+static int t1_vpm150m_getreg_full_return(struct t1 *wc, int pagechange, unsigned int len,
+ unsigned short addr, unsigned short *outbuf, struct vpm150m_cmd **hit_p)
{
int ret = 0;
unsigned long flags;
@@ -368,9 +362,9 @@ int t1_vpm150m_getreg_full_return(struct t1 *wc, int pagechange, unsigned int le
return ret;
}
-int t1_vpm150m_getreg_full(struct t1 *wc, int pagechange, unsigned int len, unsigned short addr, unsigned short *outbuf)
+static int t1_vpm150m_getreg_full(struct t1 *wc, int pagechange, unsigned int len, unsigned short addr, unsigned short *outbuf)
{
- struct vpm150m_cmd *hit = 0;
+ struct vpm150m_cmd *hit = NULL;
int ret = 0;
do {
ret = t1_vpm150m_getreg_full_async(wc, pagechange, len, addr, outbuf, &hit);
@@ -387,7 +381,7 @@ int t1_vpm150m_getreg_full(struct t1 *wc, int pagechange, unsigned int len, unsi
return ret;
}
-int t1_vpm150m_setreg_full(struct t1 *wc, int pagechange, unsigned int len, unsigned int addr, unsigned short *data)
+static int t1_vpm150m_setreg_full(struct t1 *wc, int pagechange, unsigned int len, unsigned int addr, unsigned short *data)
{
unsigned long flags;
struct vpm150m_cmd *hit;
@@ -413,7 +407,7 @@ int t1_vpm150m_setreg_full(struct t1 *wc, int pagechange, unsigned int len, unsi
return (hit) ? 0 : -1;
}
-int t1_vpm150m_setpage(struct t1 *wc, unsigned short addr)
+static int t1_vpm150m_setpage(struct t1 *wc, unsigned short addr)
{
addr &= 0xf;
/* Let's optimize this a little bit */
@@ -426,14 +420,14 @@ int t1_vpm150m_setpage(struct t1 *wc, unsigned short addr)
return t1_vpm150m_setreg_full(wc, 1, 1, 0, &addr);
}
-unsigned char t1_vpm150m_getpage(struct t1 *wc)
+static unsigned char t1_vpm150m_getpage(struct t1 *wc)
{
unsigned short res;
t1_vpm150m_getreg_full(wc, 1, 1, 0, &res);
return res;
}
-int t1_vpm150m_setreg(struct t1 *wc, unsigned int len, unsigned int addr, unsigned short *data)
+static int t1_vpm150m_setreg(struct t1 *wc, unsigned int len, unsigned int addr, unsigned short *data)
{
int res;
t1_vpm150m_setpage(wc, addr >> 16);
@@ -443,7 +437,7 @@ int t1_vpm150m_setreg(struct t1 *wc, unsigned int len, unsigned int addr, unsign
return res;
}
-unsigned short t1_vpm150m_getreg(struct t1 *wc, unsigned int len, unsigned int addr, unsigned short *data)
+static unsigned short t1_vpm150m_getreg(struct t1 *wc, unsigned int len, unsigned int addr, unsigned short *data)
{
unsigned short res;
t1_vpm150m_setpage(wc, addr >> 16);
@@ -780,7 +774,6 @@ void t1_vpm150m_init(struct t1 *wc) {
#define TEST_SIZE 2
if (debug) {
- int i;
unsigned short msg[TEST_SIZE];
set_bit(VPM150M_HPIRESET, &vpm150m->control);
@@ -957,7 +950,7 @@ void gpakReadDspMemory(
vpm150m_io_wait(wc);
if ( NumWords < VPM150M_MAX_COMMANDS ) {
- struct vpm150m_cmd* cmds[VPM150M_MAX_COMMANDS] = {0};
+ struct vpm150m_cmd* cmds[VPM150M_MAX_COMMANDS] = { NULL };
t1_vpm150m_setpage(wc, DspAddress >> 16);
DspAddress &= 0xffff;
for (i=0; i < NumWords; ++i) {
diff --git a/drivers/dahdi/wcte12xp/vpmadt032.h b/drivers/dahdi/wcte12xp/vpmadt032.h
index 77dbd4b..da50d6a 100644
--- a/drivers/dahdi/wcte12xp/vpmadt032.h
+++ b/drivers/dahdi/wcte12xp/vpmadt032.h
@@ -112,6 +112,10 @@ extern int debug;
extern int vpmsupport;
extern int vpmdtmfsupport;
extern struct pci_driver te12xp_driver;
+extern struct t1 *ifaces[WC_MAX_IFACES];
+extern int vpmnlptype;
+extern int vpmnlpthresh;
+extern int vpmnlpmaxsupp;
void t1_vpm150m_init(struct t1 *wc);
void vpm150m_cmd_dequeue(struct t1 *wc, volatile unsigned char *writechunk, int whichframe);