From 0b13254ec47e0e72bcfd29c170f5752f87e957ce Mon Sep 17 00:00:00 2001 From: Shaun Ruffell Date: Mon, 29 Jun 2009 20:56:07 +0000 Subject: dahdi-base: Enable DAHDI to manage the reference counts for the board drivers. Adds a struct module 'owner' member to the dahdi_span structure and updates all the board drivers to set this member before registering the span. This allows the core of dahdi to maintain the reference counts on the channels itself. (closes issue #10601) Reported by: Matti git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6794 a0bf4364-ded3-4de4-8d8a-66a801d63aff --- drivers/dahdi/wct4xxp/base.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'drivers/dahdi/wct4xxp') diff --git a/drivers/dahdi/wct4xxp/base.c b/drivers/dahdi/wct4xxp/base.c index d3dcdda..60b5d14 100644 --- a/drivers/dahdi/wct4xxp/base.c +++ b/drivers/dahdi/wct4xxp/base.c @@ -1573,15 +1573,11 @@ static int t4_chanconfig(struct dahdi_chan *chan, int sigtype) static int t4_open(struct dahdi_chan *chan) { - try_module_get(THIS_MODULE); - return 0; } static int t4_close(struct dahdi_chan *chan) { - module_put(THIS_MODULE); - return 0; } @@ -1631,6 +1627,7 @@ static void init_spans(struct t4 *wc) ts->span.spantype = "J1"; break; } + ts->span.owner = THIS_MODULE; ts->span.spanconfig = t4_spanconfig; ts->span.chanconfig = t4_chanconfig; ts->span.irq = wc->dev->irq; -- cgit v1.2.3