]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/bluetooth/bfusb.c
Merge remote-tracking branch 'sound-current/for-linus'
[karo-tx-linux.git] / drivers / bluetooth / bfusb.c
index a5c4d0584389713522652c472cfd5c7b5e75dbab..616ec2ac1b22f8d3e77f29848f3cd46cf830a94c 100644 (file)
@@ -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++;