aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth
diff options
context:
space:
mode:
authorAndre Guedes <andre.guedes@openbossa.org>2013-04-30 14:29:35 -0400
committerGustavo Padovan <gustavo.padovan@collabora.co.uk>2013-06-22 19:23:51 -0400
commit1183fdcad42495073045a2d9755e0a6ac2fa874e (patch)
tree431cc64a548e0ca797f314ee81539e8ec19ef7b9 /net/bluetooth
parent82f4785ca7b8d04ca6d0aaa37f1185c779744bc4 (diff)
Bluetooth: Make mgmt_stop_discovery_failed static
mgmt_stop_discovery_failed is now only used in mgmt.c so we can make it a local function. This patch also moves the mgmt_stop_ discovery_failed definition up in mgmt.c to avoid forward declaration. Signed-off-by: Andre Guedes <andre.guedes@openbossa.org> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Diffstat (limited to 'net/bluetooth')
-rw-r--r--net/bluetooth/mgmt.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index c33bc4f4d006..69d17205745b 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -2808,6 +2808,22 @@ failed:
2808 return err; 2808 return err;
2809} 2809}
2810 2810
2811static int mgmt_stop_discovery_failed(struct hci_dev *hdev, u8 status)
2812{
2813 struct pending_cmd *cmd;
2814 int err;
2815
2816 cmd = mgmt_pending_find(MGMT_OP_STOP_DISCOVERY, hdev);
2817 if (!cmd)
2818 return -ENOENT;
2819
2820 err = cmd_complete(cmd->sk, hdev->id, cmd->opcode, mgmt_status(status),
2821 &hdev->discovery.type, sizeof(hdev->discovery.type));
2822 mgmt_pending_remove(cmd);
2823
2824 return err;
2825}
2826
2811static void stop_discovery_complete(struct hci_dev *hdev, u8 status) 2827static void stop_discovery_complete(struct hci_dev *hdev, u8 status)
2812{ 2828{
2813 BT_DBG("status %d", status); 2829 BT_DBG("status %d", status);
@@ -4215,22 +4231,6 @@ int mgmt_remote_name(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type,
4215 sizeof(*ev) + eir_len, NULL); 4231 sizeof(*ev) + eir_len, NULL);
4216} 4232}
4217 4233
4218int mgmt_stop_discovery_failed(struct hci_dev *hdev, u8 status)
4219{
4220 struct pending_cmd *cmd;
4221 int err;
4222
4223 cmd = mgmt_pending_find(MGMT_OP_STOP_DISCOVERY, hdev);
4224 if (!cmd)
4225 return -ENOENT;
4226
4227 err = cmd_complete(cmd->sk, hdev->id, cmd->opcode, mgmt_status(status),
4228 &hdev->discovery.type, sizeof(hdev->discovery.type));
4229 mgmt_pending_remove(cmd);
4230
4231 return err;
4232}
4233
4234int mgmt_discovering(struct hci_dev *hdev, u8 discovering) 4234int mgmt_discovering(struct hci_dev *hdev, u8 discovering)
4235{ 4235{
4236 struct mgmt_ev_discovering ev; 4236 struct mgmt_ev_discovering ev;