]> git.karo-electronics.de Git - linux-beck.git/commitdiff
Bluetooth: Remove unnecessary call to hci_update_background_scan
authorJohan Hedberg <johan.hedberg@intel.com>
Tue, 10 Nov 2015 07:44:53 +0000 (09:44 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Thu, 19 Nov 2015 16:50:28 +0000 (17:50 +0100)
The hci_conn_params_clear_all() function is only called from
hci_unregister_dev() at which point it's completely futile to try to
do any LE scanning updates. Simply remove this unnecessary function
call. At the same time we can make the function static since it's only
accessed from within the same c-file.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
include/net/bluetooth/hci_core.h
net/bluetooth/hci_core.c

index 1878d0a96333cef013fbad0b71defa0bb274d58b..15e6a2bffc2bceb4ddffbffd1089d20017921e84 100644 (file)
@@ -1036,7 +1036,6 @@ struct hci_conn_params *hci_conn_params_lookup(struct hci_dev *hdev,
 struct hci_conn_params *hci_conn_params_add(struct hci_dev *hdev,
                                            bdaddr_t *addr, u8 addr_type);
 void hci_conn_params_del(struct hci_dev *hdev, bdaddr_t *addr, u8 addr_type);
-void hci_conn_params_clear_all(struct hci_dev *hdev);
 void hci_conn_params_clear_disabled(struct hci_dev *hdev);
 
 struct hci_conn_params *hci_pend_le_action_lookup(struct list_head *list,
index bc97fc6de8765689e42e98c21e9c10ca2ca6587c..ea648e9913f9d89f48c639b95f603e0f6a536717 100644 (file)
@@ -3070,15 +3070,13 @@ void hci_conn_params_clear_disabled(struct hci_dev *hdev)
 }
 
 /* This function requires the caller holds hdev->lock */
-void hci_conn_params_clear_all(struct hci_dev *hdev)
+static void hci_conn_params_clear_all(struct hci_dev *hdev)
 {
        struct hci_conn_params *params, *tmp;
 
        list_for_each_entry_safe(params, tmp, &hdev->le_conn_params, list)
                hci_conn_params_free(params);
 
-       hci_update_background_scan(hdev);
-
        BT_DBG("All LE connection parameters were removed");
 }