summaryrefslogtreecommitdiff
path: root/drivers/dahdi/xpp/xpp_dahdi.c
diff options
context:
space:
mode:
authorTzafrir Cohen <tzafrir.cohen@xorcom.com>2008-07-02 15:46:04 +0000
committerTzafrir Cohen <tzafrir.cohen@xorcom.com>2008-07-02 15:46:04 +0000
commit79ae04f926cd6eb59a6a716d6136423d1c27ac5c (patch)
tree20daae0698d0556659e96d562debb0a3f051a216 /drivers/dahdi/xpp/xpp_dahdi.c
parentbfb41541536eebb7bcf0903395129adfd17fd3d0 (diff)
Minor fixes following r4513:
* Convert card_bri as well. * memset each channel separately. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@4517 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi/xpp/xpp_dahdi.c')
-rw-r--r--drivers/dahdi/xpp/xpp_dahdi.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/dahdi/xpp/xpp_dahdi.c b/drivers/dahdi/xpp/xpp_dahdi.c
index 81c0486..18fbe05 100644
--- a/drivers/dahdi/xpp/xpp_dahdi.c
+++ b/drivers/dahdi/xpp/xpp_dahdi.c
@@ -892,6 +892,7 @@ static int dahdi_register_xpd(xpd_t *xpd)
struct dahdi_span *span;
xbus_t *xbus;
int cn;
+ int i;
const xops_t *xops;
BUG_ON(!xpd);
@@ -904,8 +905,10 @@ static int dahdi_register_xpd(xpd_t *xpd)
}
cn = xpd->channels;
XPD_DBG(DEVICES, xpd, "Initializing span: %d channels.\n", cn);
- memset(xpd->chans, 0, sizeof(struct dahdi_chan)*cn);
memset(&xpd->span, 0, sizeof(struct dahdi_span));
+ for(i = 0; i < cn; i++) {
+ memset(xpd->chans[i], 0, sizeof(struct dahdi_chan));
+ }
span = &xpd->span;
snprintf(span->name, MAX_SPANNAME, "%s/%s", xbus->busname, xpd->xpdname);