]> Pileus Git - ~andy/linux/commitdiff
Bluetooth: Make inquiry_cache_flush non-static
authorAndre Guedes <andre.guedes@openbossa.org>
Tue, 30 Apr 2013 18:29:27 +0000 (15:29 -0300)
committerGustavo Padovan <gustavo.padovan@collabora.co.uk>
Sat, 22 Jun 2013 23:23:49 +0000 (00:23 +0100)
In order to use HCI request framework in start_discovery, we'll need
to call inquiry_cache_flush in mgmt.c. Therefore, this patch adds the
hci_ prefix to inquiry_cache_flush and makes it non-static.

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Acked-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
include/net/bluetooth/hci_core.h
net/bluetooth/hci_core.c

index 7cb6d360d14702f04bebc0a2ad88a9466b33a607..7c150e4d65b9c3763bcd916ee4887c5b23c9d8ee 100644 (file)
@@ -432,6 +432,7 @@ void hci_inquiry_cache_update_resolve(struct hci_dev *hdev,
                                      struct inquiry_entry *ie);
 bool hci_inquiry_cache_update(struct hci_dev *hdev, struct inquiry_data *data,
                              bool name_known, bool *ssp);
+void hci_inquiry_cache_flush(struct hci_dev *hdev);
 
 /* ----- HCI Connections ----- */
 enum {
index ace5e55fe5a32ed01fd8ca3c0c63c802632ac547..43c63877c5b747f8afe72c3100797b526289ccae 100644 (file)
@@ -751,7 +751,7 @@ void hci_discovery_set_state(struct hci_dev *hdev, int state)
        hdev->discovery.state = state;
 }
 
-static void inquiry_cache_flush(struct hci_dev *hdev)
+void hci_inquiry_cache_flush(struct hci_dev *hdev)
 {
        struct discovery_state *cache = &hdev->discovery;
        struct inquiry_entry *p, *n;
@@ -964,7 +964,7 @@ int hci_inquiry(void __user *arg)
        hci_dev_lock(hdev);
        if (inquiry_cache_age(hdev) > INQUIRY_CACHE_AGE_MAX ||
            inquiry_cache_empty(hdev) || ir.flags & IREQ_CACHE_FLUSH) {
-               inquiry_cache_flush(hdev);
+               hci_inquiry_cache_flush(hdev);
                do_inquiry = 1;
        }
        hci_dev_unlock(hdev);
@@ -1230,7 +1230,7 @@ static int hci_dev_do_close(struct hci_dev *hdev)
        cancel_delayed_work_sync(&hdev->le_scan_disable);
 
        hci_dev_lock(hdev);
-       inquiry_cache_flush(hdev);
+       hci_inquiry_cache_flush(hdev);
        hci_conn_hash_flush(hdev);
        hci_dev_unlock(hdev);
 
@@ -1331,7 +1331,7 @@ int hci_dev_reset(__u16 dev)
        skb_queue_purge(&hdev->cmd_q);
 
        hci_dev_lock(hdev);
-       inquiry_cache_flush(hdev);
+       hci_inquiry_cache_flush(hdev);
        hci_conn_hash_flush(hdev);
        hci_dev_unlock(hdev);
 
@@ -3562,7 +3562,7 @@ int hci_do_inquiry(struct hci_dev *hdev, u8 length)
        if (test_bit(HCI_INQUIRY, &hdev->flags))
                return -EINPROGRESS;
 
-       inquiry_cache_flush(hdev);
+       hci_inquiry_cache_flush(hdev);
 
        memset(&cp, 0, sizeof(cp));
        memcpy(&cp.lap, lap, sizeof(cp.lap));