From: johan.hedberg@gmail.com
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH 6/9] Bluetooth: Move mgmt_pending_find to avoid forward declarations
Date: Sat, 19 Oct 2013 23:38:20 +0300 [thread overview]
Message-ID: <1382215103-6968-7-git-send-email-johan.hedberg@gmail.com> (raw)
In-Reply-To: <1382215103-6968-1-git-send-email-johan.hedberg@gmail.com>
From: Johan Hedberg <johan.hedberg@intel.com>
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>
---
net/bluetooth/mgmt.c | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 51d0446..20f6309 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)
return ptr;
}
+static struct pending_cmd *mgmt_pending_find(u16 opcode, struct hci_dev *hdev)
+{
+ struct pending_cmd *cmd;
+
+ list_for_each_entry(cmd, &hdev->mgmt_pending, list) {
+ if (cmd->opcode == opcode)
+ return cmd;
+ }
+
+ return NULL;
+}
+
static u8 create_scan_rsp_data(struct hci_dev *hdev, u8 *ptr)
{
u8 ad_len = 0;
@@ -886,18 +898,6 @@ static void mgmt_pending_foreach(u16 opcode, struct hci_dev *hdev,
}
}
-static struct pending_cmd *mgmt_pending_find(u16 opcode, struct hci_dev *hdev)
-{
- struct pending_cmd *cmd;
-
- list_for_each_entry(cmd, &hdev->mgmt_pending, list) {
- if (cmd->opcode == opcode)
- return cmd;
- }
-
- return NULL;
-}
-
static void mgmt_pending_remove(struct pending_cmd *cmd)
{
list_del(&cmd->list);
--
1.8.3.1
next prev parent reply other threads:[~2013-10-19 20:38 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-19 20:38 [PATCH 0/9] Bluetooth: Add LE support for mgmt_set_discoverable johan.hedberg
2013-10-19 20:38 ` [PATCH 1/9] Bluetooth: Check for flag instead of features in update_scan_rsp_data() johan.hedberg
2013-10-19 20:38 ` [PATCH 2/9] Bluetooth: Check for flag instead of features in update_adv_data() johan.hedberg
2013-10-19 20:38 ` [PATCH 3/9] Bluetooth: Add missing check for BREDR_ENABLED flag in update_class() johan.hedberg
2013-10-19 20:38 ` [PATCH 4/9] Bluetooth: Refactor set_connectable settings update to separate function johan.hedberg
2013-10-19 20:38 ` [PATCH 5/9] Bluetooth: Fix updating settings when there are no HCI commands to send johan.hedberg
2013-10-19 20:38 ` johan.hedberg [this message]
2013-10-19 20:38 ` [PATCH 7/9] Bluetooth: Fix sending write_scan_enable when BR/EDR is disabled johan.hedberg
2013-10-19 20:38 ` [PATCH 8/9] Bluetooth: Move HCI_LIMITED_DISCOVERABLE changes to a general place johan.hedberg
2013-10-19 20:38 ` [PATCH 9/9] Bluetooth: Update Set Discoverable to support LE johan.hedberg
2013-10-19 22:11 ` Marcel Holtmann
2013-10-20 8:55 ` [PATCH v2] " johan.hedberg
2013-10-20 16:00 ` [PATCH v3] " johan.hedberg
2013-10-20 16:07 ` Marcel Holtmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1382215103-6968-7-git-send-email-johan.hedberg@gmail.com \
--to=johan.hedberg@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox