summaryrefslogtreecommitdiffstats
path: root/kernel/drivers/bluetooth/bfusb.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/drivers/bluetooth/bfusb.c')
-rw-r--r--kernel/drivers/bluetooth/bfusb.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/kernel/drivers/bluetooth/bfusb.c b/kernel/drivers/bluetooth/bfusb.c
index fcfb72e9e..616ec2ac1 100644
--- a/kernel/drivers/bluetooth/bfusb.c
+++ b/kernel/drivers/bluetooth/bfusb.c
@@ -422,17 +422,12 @@ static int bfusb_open(struct hci_dev *hdev)
BT_DBG("hdev %p bfusb %p", hdev, data);
- if (test_and_set_bit(HCI_RUNNING, &hdev->flags))
- return 0;
-
write_lock_irqsave(&data->lock, flags);
err = bfusb_rx_submit(data, NULL);
if (!err) {
for (i = 1; i < BFUSB_MAX_BULK_RX; i++)
bfusb_rx_submit(data, NULL);
- } else {
- clear_bit(HCI_RUNNING, &hdev->flags);
}
write_unlock_irqrestore(&data->lock, flags);
@@ -458,9 +453,6 @@ static int bfusb_close(struct hci_dev *hdev)
BT_DBG("hdev %p bfusb %p", hdev, data);
- if (!test_and_clear_bit(HCI_RUNNING, &hdev->flags))
- return 0;
-
write_lock_irqsave(&data->lock, flags);
write_unlock_irqrestore(&data->lock, flags);
@@ -479,9 +471,6 @@ static int bfusb_send_frame(struct hci_dev *hdev, struct sk_buff *skb)
BT_DBG("hdev %p skb %p type %d len %d", hdev, skb, bt_cb(skb)->pkt_type, skb->len);
- if (!test_bit(HCI_RUNNING, &hdev->flags))
- return -EBUSY;
-
switch (bt_cb(skb)->pkt_type) {
case HCI_COMMAND_PKT:
hdev->stat.cmd_tx++;
@@ -492,7 +481,7 @@ static int bfusb_send_frame(struct hci_dev *hdev, struct sk_buff *skb)
case HCI_SCODATA_PKT:
hdev->stat.sco_tx++;
break;
- };
+ }
/* Prepend skb with frame type */
memcpy(skb_push(skb, 1), &bt_cb(skb)->pkt_type, 1);