summaryrefslogtreecommitdiff
path: root/drivers/dahdi/wctdm24xxp
diff options
context:
space:
mode:
authorShaun Ruffell <sruffell@digium.com>2009-08-04 16:22:17 +0000
committerShaun Ruffell <sruffell@digium.com>2009-08-04 16:22:17 +0000
commit1fce79328bde6203eac1b691ade0b7db155ced6f (patch)
tree5bebfff692e9e511d8984b6088ebf646771978ab /drivers/dahdi/wctdm24xxp
parente88959721f7bc9811f7cd72fc912cbc3c260dc02 (diff)
wctdm24xxp: We no longer need to keep our own reference count.
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6926 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi/wctdm24xxp')
-rw-r--r--drivers/dahdi/wctdm24xxp/base.c19
-rw-r--r--drivers/dahdi/wctdm24xxp/wctdm24xxp.h2
2 files changed, 4 insertions, 17 deletions
diff --git a/drivers/dahdi/wctdm24xxp/base.c b/drivers/dahdi/wctdm24xxp/base.c
index b3103ee..a4fcd88 100644
--- a/drivers/dahdi/wctdm24xxp/base.c
+++ b/drivers/dahdi/wctdm24xxp/base.c
@@ -2957,9 +2957,6 @@ static int wctdm_open(struct dahdi_chan *chan)
if (!(wc->cardflag & (1 << (chan->chanpos - 1))))
return -ENODEV;
- if (wc->dead)
- return -ENODEV;
- wc->usecount++;
/* Reset the mwi indicators */
spin_lock_irqsave(&wc->reglock, flags);
@@ -2982,7 +2979,6 @@ static int wctdm_close(struct dahdi_chan *chan)
struct wctdm *wc = chan->pvt;
int x;
signed char reg;
- wc->usecount--;
for (x=0;x<wc->cards;x++) {
if (wc->modtype[x] == MOD_TYPE_FXS) {
wc->mods[x].fxs.idletxhookstate = POLARITY_XOR(x) ? 5 : 1;
@@ -3005,9 +3001,7 @@ static int wctdm_close(struct dahdi_chan *chan)
qrv_dosetup(chan,wc);
}
}
- /* If we're dead, release us now */
- if (!wc->usecount && wc->dead)
- wctdm_release(wc);
+
return 0;
}
@@ -3800,14 +3794,9 @@ static void __devexit wctdm_remove_one(struct pci_dev *pdev)
wc->vpmadt032 = NULL;
}
- /* Release span, possibly delayed */
- if (!wc->usecount) {
- wctdm_release(wc);
- printk(KERN_INFO "Freed a Wildcard\n");
- }
- else {
- wc->dead = 1;
- }
+ /* Release span */
+ wctdm_release(wc);
+ printk(KERN_INFO "Freed a Wildcard\n");
}
}
diff --git a/drivers/dahdi/wctdm24xxp/wctdm24xxp.h b/drivers/dahdi/wctdm24xxp/wctdm24xxp.h
index 3d08bef..95f712c 100644
--- a/drivers/dahdi/wctdm24xxp/wctdm24xxp.h
+++ b/drivers/dahdi/wctdm24xxp/wctdm24xxp.h
@@ -146,13 +146,11 @@ struct wctdm {
struct dahdi_span span;
unsigned char ios;
unsigned int sdi;
- int usecount;
unsigned int intcount;
unsigned int rxints;
unsigned int txints;
unsigned char txident;
unsigned char rxident;
- int dead;
int pos;
int flags[NUM_CARDS];
int alt;