]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Bluetooth: Make mgmt_stop_discovery_failed static
authorAndre Guedes <andre.guedes@openbossa.org>
Tue, 30 Apr 2013 18:29:35 +0000 (15:29 -0300)
committerGustavo Padovan <gustavo.padovan@collabora.co.uk>
Fri, 3 May 2013 22:01:05 +0000 (19:01 -0300)
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>
include/net/bluetooth/hci_core.h
net/bluetooth/mgmt.c

index 9b226c5e2839c7ad4f910477e6636e0c2d5354de..9f5bea693cf44ee5402f588ac3736b1927d3fa99 100644 (file)
@@ -1179,7 +1179,6 @@ int mgmt_device_found(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type,
                      u8 ssp, u8 *eir, u16 eir_len);
 int mgmt_remote_name(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type,
                     u8 addr_type, s8 rssi, u8 *name, u8 name_len);
-int mgmt_stop_discovery_failed(struct hci_dev *hdev, u8 status);
 int mgmt_discovering(struct hci_dev *hdev, u8 discovering);
 int mgmt_device_blocked(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 type);
 int mgmt_device_unblocked(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 type);
index afe29fe4d4bbec554299ab151f2aaf8189076670..83db6e8d77ae010a9a9cbd39bceec9a76e04d30f 100644 (file)
@@ -2808,6 +2808,22 @@ failed:
        return err;
 }
 
+static int mgmt_stop_discovery_failed(struct hci_dev *hdev, u8 status)
+{
+       struct pending_cmd *cmd;
+       int err;
+
+       cmd = mgmt_pending_find(MGMT_OP_STOP_DISCOVERY, hdev);
+       if (!cmd)
+               return -ENOENT;
+
+       err = cmd_complete(cmd->sk, hdev->id, cmd->opcode, mgmt_status(status),
+                          &hdev->discovery.type, sizeof(hdev->discovery.type));
+       mgmt_pending_remove(cmd);
+
+       return err;
+}
+
 static void stop_discovery_complete(struct hci_dev *hdev, u8 status)
 {
        BT_DBG("status %d", status);
@@ -4194,22 +4210,6 @@ int mgmt_remote_name(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type,
                          sizeof(*ev) + eir_len, NULL);
 }
 
-int mgmt_stop_discovery_failed(struct hci_dev *hdev, u8 status)
-{
-       struct pending_cmd *cmd;
-       int err;
-
-       cmd = mgmt_pending_find(MGMT_OP_STOP_DISCOVERY, hdev);
-       if (!cmd)
-               return -ENOENT;
-
-       err = cmd_complete(cmd->sk, hdev->id, cmd->opcode, mgmt_status(status),
-                          &hdev->discovery.type, sizeof(hdev->discovery.type));
-       mgmt_pending_remove(cmd);
-
-       return err;
-}
-
 int mgmt_discovering(struct hci_dev *hdev, u8 discovering)
 {
        struct mgmt_ev_discovering ev;