Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 299031
b: refs/heads/master
c: 9432496
h: refs/heads/master
i:
  299029: 2085851
  299027: 8793342
  299023: e6d1089
v: v3
  • Loading branch information
Johan Hovold authored and Gustavo Padovan committed Mar 28, 2012
1 parent b7290cc commit 28d022a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 33b69bf80a3704d45341928e4ff68b6ebd470686
refs/heads/master: 94324962066231a938564bebad0f941cd2d06bb2
1 change: 1 addition & 0 deletions trunk/include/net/bluetooth/hci.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ enum {
HCI_SERVICE_CACHE,
HCI_LINK_KEYS,
HCI_DEBUG_KEYS,
HCI_UNREGISTER,

HCI_LE_SCAN,
HCI_SSP_ENABLED,
Expand Down
7 changes: 7 additions & 0 deletions trunk/net/bluetooth/hci_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -666,6 +666,11 @@ int hci_dev_open(__u16 dev)

hci_req_lock(hdev);

if (test_bit(HCI_UNREGISTER, &hdev->dev_flags)) {
ret = -ENODEV;
goto done;
}

if (hdev->rfkill && rfkill_blocked(hdev->rfkill)) {
ret = -ERFKILL;
goto done;
Expand Down Expand Up @@ -1850,6 +1855,8 @@ void hci_unregister_dev(struct hci_dev *hdev)

BT_DBG("%p name %s bus %d", hdev, hdev->name, hdev->bus);

set_bit(HCI_UNREGISTER, &hdev->dev_flags);

write_lock(&hci_dev_list_lock);
list_del(&hdev->list);
write_unlock(&hci_dev_list_lock);
Expand Down

0 comments on commit 28d022a

Please sign in to comment.