aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/hci_core.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-04-16 14:40:27 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-04-16 14:40:27 -0400
commitd5efccd5b6843c504042735c1e20d9252daefd98 (patch)
tree87994943963bf2f34b3f1fa982d909fd82f56746 /net/bluetooth/hci_core.c
parent516541a00c6a6bced133158f0146b602a18dcbe5 (diff)
parente816b57a337ea3b755de72bec38c10c864f23015 (diff)
ASoC: Merge tag 'v3.4-rc3' into for-3.5
Linux 3.4-rc3 contains a bunch of Tegra changes which are conflicting annoyingly with the new development that's going on for Tegra so merge it up to resolve those conflicts. Conflicts: sound/soc/soc-core.c sound/soc/tegra/tegra_i2s.c sound/soc/tegra/tegra_spdif.c
Diffstat (limited to 'net/bluetooth/hci_core.c')
-rw-r--r--net/bluetooth/hci_core.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index e33af63a884a..92a857e3786d 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);