Bluetooth: Move handling of HCI_RUNNING flag into core
[firefly-linux-kernel-4.4.55.git] / drivers / bluetooth / bpa10x.c
index 59b892464be5760c31f8deba81c26a1c32e4958f..88e004ee137ebfcd02a802e6d1decea89094a49d 100644 (file)
@@ -304,9 +304,6 @@ static int bpa10x_open(struct hci_dev *hdev)
 
        BT_DBG("%s", hdev->name);
 
-       if (test_and_set_bit(HCI_RUNNING, &hdev->flags))
-               return 0;
-
        err = bpa10x_submit_intr_urb(hdev);
        if (err < 0)
                goto error;
@@ -320,8 +317,6 @@ static int bpa10x_open(struct hci_dev *hdev)
 error:
        usb_kill_anchored_urbs(&data->rx_anchor);
 
-       clear_bit(HCI_RUNNING, &hdev->flags);
-
        return err;
 }
 
@@ -331,9 +326,6 @@ static int bpa10x_close(struct hci_dev *hdev)
 
        BT_DBG("%s", hdev->name);
 
-       if (!test_and_clear_bit(HCI_RUNNING, &hdev->flags))
-               return 0;
-
        usb_kill_anchored_urbs(&data->rx_anchor);
 
        return 0;