summaryrefslogtreecommitdiffstats
path: root/net/bluetooth/hci_core.c
diff options
context:
space:
mode:
authorJohan Hedberg2014-07-04 11:37:26 +0200
committerMarcel Holtmann2014-07-04 11:58:10 +0200
commit501f882741b139da22bb3ba4bc615a6eadce5038 (patch)
tree1dcd88ff24a0e93867c8a1f2cf7aaddff6d38eee /net/bluetooth/hci_core.c
parentBluetooth: Remove unused hci_pend_le_conn_add function (diff)
downloadkernel-qcow2-linux-501f882741b139da22bb3ba4bc615a6eadce5038.tar.gz
kernel-qcow2-linux-501f882741b139da22bb3ba4bc615a6eadce5038.tar.xz
kernel-qcow2-linux-501f882741b139da22bb3ba4bc615a6eadce5038.zip
Bluetooth: Make hci_pend_le_conn_lookup more general purposed
In some circumstances we need to look up entries in pend_le_conns and in other in pend_le_reports. This patch converts the existing lookup function for pend_le_conns to something that can be used for both lists. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth/hci_core.c')
-rw-r--r--net/bluetooth/hci_core.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 38a0c5cd0ee4..038b4748375b 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -3442,8 +3442,8 @@ static bool is_connected(struct hci_dev *hdev, bdaddr_t *addr, u8 type)
}
/* This function requires the caller holds hdev->lock */
-struct hci_conn_params *hci_pend_le_conn_lookup(struct hci_dev *hdev,
- bdaddr_t *addr, u8 addr_type)
+struct hci_conn_params *hci_pend_le_action_lookup(struct list_head *list,
+ bdaddr_t *addr, u8 addr_type)
{
struct hci_conn_params *param;
@@ -3451,7 +3451,7 @@ struct hci_conn_params *hci_pend_le_conn_lookup(struct hci_dev *hdev,
if (!hci_is_identity_address(addr, addr_type))
return NULL;
- list_for_each_entry(param, &hdev->pend_le_conns, action) {
+ list_for_each_entry(param, list, action) {
if (bacmp(&param->addr, addr) == 0 &&
param->addr_type == addr_type)
return param;