]> Pileus Git - ~andy/linux/commitdiff
Bluetooth: Make mgmt_start_discovery_failed static
authorAndre Guedes <andre.guedes@openbossa.org>
Tue, 30 Apr 2013 18:29:30 +0000 (15:29 -0300)
committerGustavo Padovan <gustavo.padovan@collabora.co.uk>
Sat, 22 Jun 2013 23:23:50 +0000 (00:23 +0100)
mgmt_start_discovery_failed is now only used in mgmt.c so we can
make it a local function. This patch also moves the mgmt_start_
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 7c150e4d65b9c3763bcd916ee4887c5b23c9d8ee..ff4e8a5c9ceb0fb577c2272b58ba65370bbc552a 100644 (file)
@@ -1170,7 +1170,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_start_discovery_failed(struct hci_dev *hdev, u8 status);
 int mgmt_stop_discovery_failed(struct hci_dev *hdev, u8 status);
 int mgmt_discovering(struct hci_dev *hdev, u8 discovering);
 int mgmt_interleaved_discovery(struct hci_dev *hdev);
index 434df715448e7b837246ef93c7f1214f0b5930de..a9bd271a736eba0d0c2c2d2f55697881ec0c3b42 100644 (file)
@@ -2650,6 +2650,27 @@ int mgmt_interleaved_discovery(struct hci_dev *hdev)
        return err;
 }
 
+static int mgmt_start_discovery_failed(struct hci_dev *hdev, u8 status)
+{
+       struct pending_cmd *cmd;
+       u8 type;
+       int err;
+
+       hci_discovery_set_state(hdev, DISCOVERY_STOPPED);
+
+       cmd = mgmt_pending_find(MGMT_OP_START_DISCOVERY, hdev);
+       if (!cmd)
+               return -ENOENT;
+
+       type = hdev->discovery.type;
+
+       err = cmd_complete(cmd->sk, hdev->id, cmd->opcode, mgmt_status(status),
+                          &type, sizeof(type));
+       mgmt_pending_remove(cmd);
+
+       return err;
+}
+
 static void start_discovery_complete(struct hci_dev *hdev, u8 status)
 {
        BT_DBG("status %d", status);
@@ -4190,27 +4211,6 @@ int mgmt_remote_name(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type,
                          sizeof(*ev) + eir_len, NULL);
 }
 
-int mgmt_start_discovery_failed(struct hci_dev *hdev, u8 status)
-{
-       struct pending_cmd *cmd;
-       u8 type;
-       int err;
-
-       hci_discovery_set_state(hdev, DISCOVERY_STOPPED);
-
-       cmd = mgmt_pending_find(MGMT_OP_START_DISCOVERY, hdev);
-       if (!cmd)
-               return -ENOENT;
-
-       type = hdev->discovery.type;
-
-       err = cmd_complete(cmd->sk, hdev->id, cmd->opcode, mgmt_status(status),
-                          &type, sizeof(type));
-       mgmt_pending_remove(cmd);
-
-       return err;
-}
-
 int mgmt_stop_discovery_failed(struct hci_dev *hdev, u8 status)
 {
        struct pending_cmd *cmd;