summaryrefslogtreecommitdiff
path: root/wcte12xp/vpmadt032.c
diff options
context:
space:
mode:
authormspiceland <mspiceland@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2007-12-11 00:07:19 +0000
committermspiceland <mspiceland@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2007-12-11 00:07:19 +0000
commit16175dac3a1e5b73f8bd2ca6a5d65d2c55dc4901 (patch)
treec68cb896b9c5ca36a42b5306cdc9d1c0d6303460 /wcte12xp/vpmadt032.c
parent8d7bc1c2959659c6649ca6ade2467f0ee88b7864 (diff)
If we detect that we have a VPMADT032 module but there is an error during
initialization, we don't proceed and register with Zaptel. This will prevent customers with faulty VPMADT032 modules from going undetected. Customers can always load with vpmsupport=0 to proceed with this error but will do so knowingly. git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.2@3405 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'wcte12xp/vpmadt032.c')
-rw-r--r--wcte12xp/vpmadt032.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/wcte12xp/vpmadt032.c b/wcte12xp/vpmadt032.c
index ca15e7c..90af94c 100644
--- a/wcte12xp/vpmadt032.c
+++ b/wcte12xp/vpmadt032.c
@@ -641,7 +641,7 @@ static void vpm150m_dtmf_bh(struct work_struct *data)
return;
}
-void t1_vpm150m_init(struct t1 *wc) {
+int t1_vpm150m_init(struct t1 *wc) {
struct vpm150m *vpm150m;
unsigned short i;
unsigned short reg;
@@ -666,14 +666,14 @@ void t1_vpm150m_init(struct t1 *wc) {
if (!vpmsupport) {
module_printk("VPM Support Disabled\n");
wc->vpm150m = NULL;
- return;
+ return 0; /* not fatal for the card */
}
vpm150m = kmalloc(sizeof(struct vpm150m), GFP_KERNEL);
if (!vpm150m) {
module_printk("Unable to allocate VPMADT032!\n");
- return;
+ return -1;
}
memset(vpm150m, 0, sizeof(struct vpm150m));
@@ -873,7 +873,7 @@ void t1_vpm150m_init(struct t1 *wc) {
if ((request_firmware(&firmware, vpmadt032_firmware, &wc->dev->dev) != 0) ||
!firmware) {
printk("VPMADT032: firmware %s not available from userspace\n", vpmadt032_firmware);
- return;
+ return -1;
}
#else
embedded_firmware.data = _binary_vpmadt032_bin_start;
@@ -942,7 +942,7 @@ void t1_vpm150m_init(struct t1 *wc) {
goto failed_exit;
}
- return;
+ return 0;
failed_exit:
spin_lock_irqsave(&wc->reglock, flags);
@@ -950,7 +950,7 @@ failed_exit:
spin_unlock_irqrestore(&wc->reglock, flags);
kfree(vpm150m);
- return;
+ return -1;
}
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -