diff options
author | Gustavo F. Padovan <padovan@profusion.mobi> | 2011-12-22 13:30:27 -0500 |
---|---|---|
committer | Gustavo F. Padovan <padovan@profusion.mobi> | 2011-12-22 15:06:24 -0500 |
commit | f20d09d5f7093e5dc5f231c65835e2d04739bd5e (patch) | |
tree | 846904ba60bf7af0b3bfb3663843b971f919e73f /net | |
parent | 460da45d92f19adda1b79910652d5a23c65dd272 (diff) |
Bluetooth: remove *_bh usage from hci_dev_list and hci_cb_list
They don't need to disable interrupts anymore, we only run in process
context now.
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'net')
-rw-r--r-- | net/bluetooth/hci_conn.c | 4 | ||||
-rw-r--r-- | net/bluetooth/hci_core.c | 24 |
2 files changed, 14 insertions, 14 deletions
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c index 401d8ea266aa..3db432473ad5 100644 --- a/net/bluetooth/hci_conn.c +++ b/net/bluetooth/hci_conn.c | |||
@@ -487,7 +487,7 @@ struct hci_dev *hci_get_route(bdaddr_t *dst, bdaddr_t *src) | |||
487 | 487 | ||
488 | BT_DBG("%s -> %s", batostr(src), batostr(dst)); | 488 | BT_DBG("%s -> %s", batostr(src), batostr(dst)); |
489 | 489 | ||
490 | read_lock_bh(&hci_dev_list_lock); | 490 | read_lock(&hci_dev_list_lock); |
491 | 491 | ||
492 | list_for_each_entry(d, &hci_dev_list, list) { | 492 | list_for_each_entry(d, &hci_dev_list, list) { |
493 | if (!test_bit(HCI_UP, &d->flags) || test_bit(HCI_RAW, &d->flags)) | 493 | if (!test_bit(HCI_UP, &d->flags) || test_bit(HCI_RAW, &d->flags)) |
@@ -512,7 +512,7 @@ struct hci_dev *hci_get_route(bdaddr_t *dst, bdaddr_t *src) | |||
512 | if (hdev) | 512 | if (hdev) |
513 | hdev = hci_dev_hold(hdev); | 513 | hdev = hci_dev_hold(hdev); |
514 | 514 | ||
515 | read_unlock_bh(&hci_dev_list_lock); | 515 | read_unlock(&hci_dev_list_lock); |
516 | return hdev; | 516 | return hdev; |
517 | } | 517 | } |
518 | EXPORT_SYMBOL(hci_get_route); | 518 | EXPORT_SYMBOL(hci_get_route); |
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index 22c8331cd0d5..4f0ff01dc680 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c | |||
@@ -844,7 +844,7 @@ int hci_get_dev_list(void __user *arg) | |||
844 | 844 | ||
845 | dr = dl->dev_req; | 845 | dr = dl->dev_req; |
846 | 846 | ||
847 | read_lock_bh(&hci_dev_list_lock); | 847 | read_lock(&hci_dev_list_lock); |
848 | list_for_each_entry(hdev, &hci_dev_list, list) { | 848 | list_for_each_entry(hdev, &hci_dev_list, list) { |
849 | if (test_and_clear_bit(HCI_AUTO_OFF, &hdev->flags)) | 849 | if (test_and_clear_bit(HCI_AUTO_OFF, &hdev->flags)) |
850 | cancel_delayed_work(&hdev->power_off); | 850 | cancel_delayed_work(&hdev->power_off); |
@@ -858,7 +858,7 @@ int hci_get_dev_list(void __user *arg) | |||
858 | if (++n >= dev_num) | 858 | if (++n >= dev_num) |
859 | break; | 859 | break; |
860 | } | 860 | } |
861 | read_unlock_bh(&hci_dev_list_lock); | 861 | read_unlock(&hci_dev_list_lock); |
862 | 862 | ||
863 | dl->dev_num = n; | 863 | dl->dev_num = n; |
864 | size = sizeof(*dl) + n * sizeof(*dr); | 864 | size = sizeof(*dl) + n * sizeof(*dr); |
@@ -1458,7 +1458,7 @@ int hci_register_dev(struct hci_dev *hdev) | |||
1458 | */ | 1458 | */ |
1459 | id = (hdev->dev_type == HCI_BREDR) ? 0 : 1; | 1459 | id = (hdev->dev_type == HCI_BREDR) ? 0 : 1; |
1460 | 1460 | ||
1461 | write_lock_bh(&hci_dev_list_lock); | 1461 | write_lock(&hci_dev_list_lock); |
1462 | 1462 | ||
1463 | /* Find first available device id */ | 1463 | /* Find first available device id */ |
1464 | list_for_each(p, &hci_dev_list) { | 1464 | list_for_each(p, &hci_dev_list) { |
@@ -1528,7 +1528,7 @@ int hci_register_dev(struct hci_dev *hdev) | |||
1528 | 1528 | ||
1529 | atomic_set(&hdev->promisc, 0); | 1529 | atomic_set(&hdev->promisc, 0); |
1530 | 1530 | ||
1531 | write_unlock_bh(&hci_dev_list_lock); | 1531 | write_unlock(&hci_dev_list_lock); |
1532 | 1532 | ||
1533 | hdev->workqueue = alloc_workqueue(hdev->name, WQ_HIGHPRI | WQ_UNBOUND | | 1533 | hdev->workqueue = alloc_workqueue(hdev->name, WQ_HIGHPRI | WQ_UNBOUND | |
1534 | WQ_MEM_RECLAIM, 1); | 1534 | WQ_MEM_RECLAIM, 1); |
@@ -1561,9 +1561,9 @@ int hci_register_dev(struct hci_dev *hdev) | |||
1561 | err_wqueue: | 1561 | err_wqueue: |
1562 | destroy_workqueue(hdev->workqueue); | 1562 | destroy_workqueue(hdev->workqueue); |
1563 | err: | 1563 | err: |
1564 | write_lock_bh(&hci_dev_list_lock); | 1564 | write_lock(&hci_dev_list_lock); |
1565 | list_del(&hdev->list); | 1565 | list_del(&hdev->list); |
1566 | write_unlock_bh(&hci_dev_list_lock); | 1566 | write_unlock(&hci_dev_list_lock); |
1567 | 1567 | ||
1568 | return error; | 1568 | return error; |
1569 | } | 1569 | } |
@@ -1576,9 +1576,9 @@ void hci_unregister_dev(struct hci_dev *hdev) | |||
1576 | 1576 | ||
1577 | BT_DBG("%p name %s bus %d", hdev, hdev->name, hdev->bus); | 1577 | BT_DBG("%p name %s bus %d", hdev, hdev->name, hdev->bus); |
1578 | 1578 | ||
1579 | write_lock_bh(&hci_dev_list_lock); | 1579 | write_lock(&hci_dev_list_lock); |
1580 | list_del(&hdev->list); | 1580 | list_del(&hdev->list); |
1581 | write_unlock_bh(&hci_dev_list_lock); | 1581 | write_unlock(&hci_dev_list_lock); |
1582 | 1582 | ||
1583 | hci_dev_do_close(hdev); | 1583 | hci_dev_do_close(hdev); |
1584 | 1584 | ||
@@ -1830,9 +1830,9 @@ int hci_register_cb(struct hci_cb *cb) | |||
1830 | { | 1830 | { |
1831 | BT_DBG("%p name %s", cb, cb->name); | 1831 | BT_DBG("%p name %s", cb, cb->name); |
1832 | 1832 | ||
1833 | write_lock_bh(&hci_cb_list_lock); | 1833 | write_lock(&hci_cb_list_lock); |
1834 | list_add(&cb->list, &hci_cb_list); | 1834 | list_add(&cb->list, &hci_cb_list); |
1835 | write_unlock_bh(&hci_cb_list_lock); | 1835 | write_unlock(&hci_cb_list_lock); |
1836 | 1836 | ||
1837 | return 0; | 1837 | return 0; |
1838 | } | 1838 | } |
@@ -1842,9 +1842,9 @@ int hci_unregister_cb(struct hci_cb *cb) | |||
1842 | { | 1842 | { |
1843 | BT_DBG("%p name %s", cb, cb->name); | 1843 | BT_DBG("%p name %s", cb, cb->name); |
1844 | 1844 | ||
1845 | write_lock_bh(&hci_cb_list_lock); | 1845 | write_lock(&hci_cb_list_lock); |
1846 | list_del(&cb->list); | 1846 | list_del(&cb->list); |
1847 | write_unlock_bh(&hci_cb_list_lock); | 1847 | write_unlock(&hci_cb_list_lock); |
1848 | 1848 | ||
1849 | return 0; | 1849 | return 0; |
1850 | } | 1850 | } |