diff options
author | James Morris <james.l.morris@oracle.com> | 2012-05-03 22:46:40 -0400 |
---|---|---|
committer | James Morris <james.l.morris@oracle.com> | 2012-05-03 22:46:40 -0400 |
commit | 898bfc1d46bd76f8ea2a0fbd239dd2073efe2aa3 (patch) | |
tree | e6e666085abe674dbf6292555961fe0a0f2e2d2f /net/bluetooth/hci_core.c | |
parent | 08162e6a23d476544adfe1164afe9ea8b34ab859 (diff) | |
parent | 69964ea4c7b68c9399f7977aa5b9aa6539a6a98a (diff) |
Merge tag 'v3.4-rc5' into next
Linux 3.4-rc5
Merge to pull in prerequisite change for Smack:
86812bb0de1a3758dc6c7aa01a763158a7c0638a
Requested by Casey.
Diffstat (limited to 'net/bluetooth/hci_core.c')
-rw-r--r-- | net/bluetooth/hci_core.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index e33af63a884..92a857e3786 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c | |||
@@ -665,6 +665,11 @@ int hci_dev_open(__u16 dev) | |||
665 | 665 | ||
666 | hci_req_lock(hdev); | 666 | hci_req_lock(hdev); |
667 | 667 | ||
668 | if (test_bit(HCI_UNREGISTER, &hdev->dev_flags)) { | ||
669 | ret = -ENODEV; | ||
670 | goto done; | ||
671 | } | ||
672 | |||
668 | if (hdev->rfkill && rfkill_blocked(hdev->rfkill)) { | 673 | if (hdev->rfkill && rfkill_blocked(hdev->rfkill)) { |
669 | ret = -ERFKILL; | 674 | ret = -ERFKILL; |
670 | goto done; | 675 | goto done; |
@@ -1849,6 +1854,8 @@ void hci_unregister_dev(struct hci_dev *hdev) | |||
1849 | 1854 | ||
1850 | BT_DBG("%p name %s bus %d", hdev, hdev->name, hdev->bus); | 1855 | BT_DBG("%p name %s bus %d", hdev, hdev->name, hdev->bus); |
1851 | 1856 | ||
1857 | set_bit(HCI_UNREGISTER, &hdev->dev_flags); | ||
1858 | |||
1852 | write_lock(&hci_dev_list_lock); | 1859 | write_lock(&hci_dev_list_lock); |
1853 | list_del(&hdev->list); | 1860 | list_del(&hdev->list); |
1854 | write_unlock(&hci_dev_list_lock); | 1861 | write_unlock(&hci_dev_list_lock); |