mISDN: Make clearing B-channel a common function
Clearing B-channel is needed in every driver, so it makes sense to have it as common function. Signed-off-by: Karsten Keil <keil@b1-systems.de>
This commit is contained in:
@@ -1809,21 +1809,7 @@ deactivate_bchannel(struct bchannel *bch)
|
||||
hw->name, __func__, bch->nr);
|
||||
|
||||
spin_lock_irqsave(&hw->lock, flags);
|
||||
if (test_and_clear_bit(FLG_TX_NEXT, &bch->Flags)) {
|
||||
dev_kfree_skb(bch->next_skb);
|
||||
bch->next_skb = NULL;
|
||||
}
|
||||
if (bch->tx_skb) {
|
||||
dev_kfree_skb(bch->tx_skb);
|
||||
bch->tx_skb = NULL;
|
||||
}
|
||||
bch->tx_idx = 0;
|
||||
if (bch->rx_skb) {
|
||||
dev_kfree_skb(bch->rx_skb);
|
||||
bch->rx_skb = NULL;
|
||||
}
|
||||
clear_bit(FLG_ACTIVE, &bch->Flags);
|
||||
clear_bit(FLG_TX_BUSY, &bch->Flags);
|
||||
mISDN_clear_bchannel(bch);
|
||||
spin_unlock_irqrestore(&hw->lock, flags);
|
||||
hfcsusb_setup_bch(bch, ISDN_P_NONE);
|
||||
hfcsusb_stop_endpoint(hw, bch->nr);
|
||||
|
Reference in New Issue
Block a user