summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTzafrir Cohen <tzafrir.cohen@xorcom.com>2011-11-02 14:19:14 +0000
committerTzafrir Cohen <tzafrir.cohen@xorcom.com>2011-11-02 14:19:14 +0000
commit2009ce87cd47400f42d7cbf6b68ce472c485d93c (patch)
tree1d6ed51a22887f2e1ce0244bf4edae53765dab37
parent5fa21d8d3801ae92c901c70145c04d89e635776b (diff)
xpp: bugfix -- manage xpd refcount for EC module
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10301 a0bf4364-ded3-4de4-8d8a-66a801d63aff
-rw-r--r--drivers/dahdi/xpp/xpp_dahdi.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/dahdi/xpp/xpp_dahdi.c b/drivers/dahdi/xpp/xpp_dahdi.c
index 1b596ae..5dbca26 100644
--- a/drivers/dahdi/xpp/xpp_dahdi.c
+++ b/drivers/dahdi/xpp/xpp_dahdi.c
@@ -864,6 +864,7 @@ static void echocan_free(struct dahdi_chan *chan,
LINE_DBG(GENERAL, xpd, pos, "mode=0x%X\n", ec->status.mode);
CALL_EC_METHOD(ec_set, xbus, xpd, pos, 0);
CALL_EC_METHOD(ec_update, xbus, xbus);
+ put_xpd(__FUNCTION__, xpd); /* aquired in xpp_echocan_create() */
}
static const struct dahdi_echocan_features xpp_ec_features = {
@@ -886,7 +887,7 @@ const char *xpp_echocan_name(const struct dahdi_chan *chan)
xpd = chan->pvt;
xbus = xpd->xbus;
pos = chan->chanpos - 1;
- LINE_DBG(GENERAL, xpd, pos, "%s:\n", __func__);
+ LINE_DBG(GENERAL, xpd, pos, "\n");
if (!ECHOOPS(xbus))
return NULL;
/*
@@ -935,6 +936,7 @@ int xpp_echocan_create(struct dahdi_chan *chan,
*ec = phonedev->ec[pos];
(*ec)->ops = &xpp_ec_ops;
(*ec)->features = xpp_ec_features;
+ xpd = get_xpd(__FUNCTION__, xpd); /* Returned in echocan_free() */
LINE_DBG(GENERAL, xpd, pos, "(tap=%d, param_count=%d)\n",
ecp->tap_length, ecp->param_count);
ret = CALL_EC_METHOD(ec_set, xbus, xpd, pos, 1);