From bc4ae5301d9c34a7f4df74ba1e84742b8e65ab58 Mon Sep 17 00:00:00 2001 From: Tzafrir Cohen Date: Tue, 24 Aug 2010 12:28:39 +0300 Subject: set modules to be ower-s of their spans Set 'span->owner = THIS_MODULE' for all of our drivers. This is for the reference counting introduced in 2.3. Otherwise we get annoying WARN_ON traces. Origin: http://bugs.elastix.org/view.php?id=408 (Patch kernel_tainted_zaphfc_opvxa1200.patch by Odicha) --- drivers/dahdi/opvxa1200.c | 1 + drivers/dahdi/wcopenpci.c | 1 + drivers/dahdi/zaphfc/base.c | 1 + 3 files changed, 3 insertions(+) diff --git a/drivers/dahdi/opvxa1200.c b/drivers/dahdi/opvxa1200.c index 02eb864..8a5193e 100644 --- a/drivers/dahdi/opvxa1200.c +++ b/drivers/dahdi/opvxa1200.c @@ -2403,6 +2403,7 @@ static int wctdm_initialize(struct wctdm *wc) wc->span.chans = wc->chans; wc->span.channels = wc->max_cards; /*MAX_NUM_CARDS;*/ wc->span.hooksig = wctdm_hooksig; + wc->span.owner = THIS_MODULE; wc->span.irq = wc->dev->irq; wc->span.open = wctdm_open; wc->span.close = wctdm_close; diff --git a/drivers/dahdi/wcopenpci.c b/drivers/dahdi/wcopenpci.c index 6768d07..b28cac4 100644 --- a/drivers/dahdi/wcopenpci.c +++ b/drivers/dahdi/wcopenpci.c @@ -1313,6 +1313,7 @@ static int span_initialize(struct openpci *wc) wc->span.chans = wc->chans; wc->span.channels = MAX_PORTS; wc->span.hooksig = openpci_hooksig; + wc->span.owner = THIS_MODULE; wc->span.open = openpci_open; wc->span.close = openpci_close; wc->span.flags = DAHDI_FLAG_RBS; diff --git a/drivers/dahdi/zaphfc/base.c b/drivers/dahdi/zaphfc/base.c index 60a5688..049a37b 100644 --- a/drivers/dahdi/zaphfc/base.c +++ b/drivers/dahdi/zaphfc/base.c @@ -657,6 +657,7 @@ static int hfc_zap_initialize(struct dahdi_hfc *hfccard) hfccard->span.spantype = hfctmp->nt_mode ? "NT" : "TE"; hfccard->span.manufacturer = "Cologne Chips"; hfccard->span.spanconfig = hfc_zap_spanconfig; + hfccard->span.owner = THIS_MODULE; hfccard->span.chanconfig = hfc_zap_chanconfig; hfccard->span.startup = hfc_zap_startup; hfccard->span.shutdown = hfc_zap_shutdown; -- cgit v1.2.3