summaryrefslogtreecommitdiff
path: root/drivers/isdn/hardware/mISDN/w6692.c
diff options
context:
space:
mode:
authorKarsten Keil <kkeil@linux-pingi.de>2012-05-16 03:51:01 +0400
committerDavid S. Miller <davem@davemloft.net>2012-05-16 23:22:06 +0400
commit1368112c07bae879fa3d1c21f236ca8eea3e5e84 (patch)
tree3467a277cc350bbfaf3e98df9513d4209e63f984 /drivers/isdn/hardware/mISDN/w6692.c
parentdd456d45d7edd01f4054818dd404ec61ca55cbc1 (diff)
downloadlinux-1368112c07bae879fa3d1c21f236ca8eea3e5e84.tar.xz
mISDN: Cleanup channel also if it already was deactivated
If a channel was closed after it was deactivated it could happen that something was not proper resetted. The test if a channel is still activ was wrong, so remove it and always do the cleanup. Signed-off-by: Karsten Keil <kkeil@linux-pingi.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/isdn/hardware/mISDN/w6692.c')
-rw-r--r--drivers/isdn/hardware/mISDN/w6692.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/isdn/hardware/mISDN/w6692.c b/drivers/isdn/hardware/mISDN/w6692.c
index 1d044670ff66..0b5e9297e95b 100644
--- a/drivers/isdn/hardware/mISDN/w6692.c
+++ b/drivers/isdn/hardware/mISDN/w6692.c
@@ -1061,15 +1061,10 @@ w6692_bctrl(struct mISDNchannel *ch, u32 cmd, void *arg)
switch (cmd) {
case CLOSE_CHANNEL:
test_and_clear_bit(FLG_OPEN, &bch->Flags);
- if (test_bit(FLG_ACTIVE, &bch->Flags)) {
- spin_lock_irqsave(&card->lock, flags);
- mISDN_freebchannel(bch);
- w6692_mode(bc, ISDN_P_NONE);
- spin_unlock_irqrestore(&card->lock, flags);
- } else {
- skb_queue_purge(&bch->rqueue);
- bch->rcount = 0;
- }
+ spin_lock_irqsave(&card->lock, flags);
+ mISDN_freebchannel(bch);
+ w6692_mode(bc, ISDN_P_NONE);
+ spin_unlock_irqrestore(&card->lock, flags);
ch->protocol = ISDN_P_NONE;
ch->peer = NULL;
module_put(THIS_MODULE);