summaryrefslogtreecommitdiffstats
path: root/drivers/bluetooth/btmrvl_main.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2015-10-04 23:34:02 +0200
committerJohan Hedberg <johan.hedberg@intel.com>2015-10-05 09:30:25 +0200
commite9ca8bf157f2b45f8f670517c96da313083ee9b2 (patch)
tree7aaa31766e0af85588a84f0d06d65d5b77375f7b /drivers/bluetooth/btmrvl_main.c
parentBluetooth: Move HCI_RUNNING check into hci_send_frame (diff)
downloadlinux-e9ca8bf157f2b45f8f670517c96da313083ee9b2.tar.xz
linux-e9ca8bf157f2b45f8f670517c96da313083ee9b2.zip
Bluetooth: Move handling of HCI_RUNNING flag into core
Setting and clearing of HCI_RUNNING flag in each and every driver is just duplicating the same code all over the place. So instead of having the driver do it in their hdev->open and hdev->close callbacks, set it globally in the core transport handling. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'drivers/bluetooth/btmrvl_main.c')
-rw-r--r--drivers/bluetooth/btmrvl_main.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/bluetooth/btmrvl_main.c b/drivers/bluetooth/btmrvl_main.c
index 39552a8e9cc7..6ba22862d788 100644
--- a/drivers/bluetooth/btmrvl_main.c
+++ b/drivers/bluetooth/btmrvl_main.c
@@ -470,9 +470,6 @@ static int btmrvl_close(struct hci_dev *hdev)
{
struct btmrvl_private *priv = hci_get_drvdata(hdev);
- if (!test_and_clear_bit(HCI_RUNNING, &hdev->flags))
- return 0;
-
skb_queue_purge(&priv->adapter->tx_queue);
return 0;
@@ -480,8 +477,6 @@ static int btmrvl_close(struct hci_dev *hdev)
static int btmrvl_open(struct hci_dev *hdev)
{
- set_bit(HCI_RUNNING, &hdev->flags);
-
return 0;
}