[dahdi-commits] sruffell: linux/trunk r4558 - /linux/trunk/drivers/dahdi/wctdm24xxp/base.c
SVN commits to the DAHDI project
dahdi-commits at lists.digium.com
Mon Jul 7 14:36:58 CDT 2008
Author: sruffell
Date: Mon Jul 7 14:36:57 2008
New Revision: 4558
URL: http://svn.digium.com/view/dahdi?view=rev&rev=4558
Log:
wctdm_initialize expects the channels to already be allocated.
Modified:
linux/trunk/drivers/dahdi/wctdm24xxp/base.c
Modified: linux/trunk/drivers/dahdi/wctdm24xxp/base.c
URL: http://svn.digium.com/view/dahdi/linux/trunk/drivers/dahdi/wctdm24xxp/base.c?view=diff&rev=4558&r1=4557&r2=4558
==============================================================================
--- linux/trunk/drivers/dahdi/wctdm24xxp/base.c (original)
+++ linux/trunk/drivers/dahdi/wctdm24xxp/base.c Mon Jul 7 14:36:57 2008
@@ -3809,6 +3809,15 @@
init_waitqueue_head(&wc->regq);
+ for (i = 0; i < wc->cards; i++) {
+ if (!(wc->chans[i] = kmalloc(sizeof(*wc->chans[i]), GFP_KERNEL))) {
+ free_wc(wc);
+ return -ENOMEM;
+ }
+ memset(wc->chans[i], 0, sizeof(*wc->chans[i]));
+ }
+
+
if (wctdm_initialize(wc)) {
voicebus_release(wc->vb);
wc->vb = NULL;
@@ -3843,14 +3852,6 @@
/* Final initialization */
wctdm_post_initialize(wc);
- for (i = 0; i < wc->cards; i++) {
- if (!(wc->chans[i] = kmalloc(sizeof(*wc->chans[i]), GFP_KERNEL))) {
- free_wc(wc);
- return -ENOMEM;
- }
- memset(wc->chans[i], 0, sizeof(*wc->chans[i]));
- }
-
/* We should be ready for DAHDI to come in now. */
if (dahdi_register(&wc->span, 0)) {
printk("Unable to register span with DAHDI\n");
More information about the dahdi-commits
mailing list