aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2013-10-19 16:38:20 -0400
committerMarcel Holtmann <marcel@holtmann.org>2013-10-20 12:05:40 -0400
commiteb2a8d202f91b874d5650c9e0a2c42fdaf137d91 (patch)
treea1dace365928dca379ecff1c5aaf7389c4dc5f8a /net/bluetooth
parenta81070ba3743400444275cc87f8f91bb5b67dd4b (diff)
Bluetooth: Move mgmt_pending_find to avoid forward declarations
We will soon need this function for updating the advertising data, so move it higher up in mgmt.c to avoid a forward declaration. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth')
-rw-r--r--net/bluetooth/mgmt.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 51d0446bc4ed..20f6309f8245 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -536,6 +536,18 @@ static u8 *create_uuid128_list(struct hci_dev *hdev, u8 *data, ptrdiff_t len)
536 return ptr; 536 return ptr;
537} 537}
538 538
539static struct pending_cmd *mgmt_pending_find(u16 opcode, struct hci_dev *hdev)
540{
541 struct pending_cmd *cmd;
542
543 list_for_each_entry(cmd, &hdev->mgmt_pending, list) {
544 if (cmd->opcode == opcode)
545 return cmd;
546 }
547
548 return NULL;
549}
550
539static u8 create_scan_rsp_data(struct hci_dev *hdev, u8 *ptr) 551static u8 create_scan_rsp_data(struct hci_dev *hdev, u8 *ptr)
540{ 552{
541 u8 ad_len = 0; 553 u8 ad_len = 0;
@@ -886,18 +898,6 @@ static void mgmt_pending_foreach(u16 opcode, struct hci_dev *hdev,
886 } 898 }
887} 899}
888 900
889static struct pending_cmd *mgmt_pending_find(u16 opcode, struct hci_dev *hdev)
890{
891 struct pending_cmd *cmd;
892
893 list_for_each_entry(cmd, &hdev->mgmt_pending, list) {
894 if (cmd->opcode == opcode)
895 return cmd;
896 }
897
898 return NULL;
899}
900
901static void mgmt_pending_remove(struct pending_cmd *cmd) 901static void mgmt_pending_remove(struct pending_cmd *cmd)
902{ 902{
903 list_del(&cmd->list); 903 list_del(&cmd->list);