mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 12:44:03 +02:00
Bluetooth: hci_sync: Remove unused hci_cmd_sync_dequeue_once()
hci_cmd_sync_dequeue_once() had a single in-tree caller, hci_cancel_connect_sync(), which now holds cmd_sync_work_lock across the in-flight create flag test and the dequeue and so open-codes the lookup and cancel under that lock. That leaves the exported hci_cmd_sync_dequeue_once() with no in-tree user, so remove it along with its declaration. Signed-off-by: Siwei Zhang <oss@fourdim.xyz> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit is contained in:
parent
288f31431b
commit
dc7b9893a3
|
|
@ -84,9 +84,6 @@ void hci_cmd_sync_cancel_entry(struct hci_dev *hdev,
|
|||
struct hci_cmd_sync_work_entry *entry);
|
||||
bool hci_cmd_sync_dequeue(struct hci_dev *hdev, hci_cmd_sync_work_func_t func,
|
||||
void *data, hci_cmd_sync_work_destroy_t destroy);
|
||||
bool hci_cmd_sync_dequeue_once(struct hci_dev *hdev,
|
||||
hci_cmd_sync_work_func_t func, void *data,
|
||||
hci_cmd_sync_work_destroy_t destroy);
|
||||
|
||||
int hci_update_eir_sync(struct hci_dev *hdev);
|
||||
int hci_update_class_sync(struct hci_dev *hdev);
|
||||
|
|
|
|||
|
|
@ -860,32 +860,6 @@ void hci_cmd_sync_cancel_entry(struct hci_dev *hdev,
|
|||
}
|
||||
EXPORT_SYMBOL(hci_cmd_sync_cancel_entry);
|
||||
|
||||
/* Dequeue one HCI command entry:
|
||||
*
|
||||
* - Lookup and cancel first entry that matches.
|
||||
*/
|
||||
bool hci_cmd_sync_dequeue_once(struct hci_dev *hdev,
|
||||
hci_cmd_sync_work_func_t func,
|
||||
void *data, hci_cmd_sync_work_destroy_t destroy)
|
||||
{
|
||||
struct hci_cmd_sync_work_entry *entry;
|
||||
|
||||
mutex_lock(&hdev->cmd_sync_work_lock);
|
||||
|
||||
entry = _hci_cmd_sync_lookup_entry(hdev, func, data, destroy);
|
||||
if (!entry) {
|
||||
mutex_unlock(&hdev->cmd_sync_work_lock);
|
||||
return false;
|
||||
}
|
||||
|
||||
_hci_cmd_sync_cancel_entry(hdev, entry, -ECANCELED);
|
||||
|
||||
mutex_unlock(&hdev->cmd_sync_work_lock);
|
||||
|
||||
return true;
|
||||
}
|
||||
EXPORT_SYMBOL(hci_cmd_sync_dequeue_once);
|
||||
|
||||
/* Dequeue HCI command entry:
|
||||
*
|
||||
* - Lookup and cancel any entry that matches by function callback or data or
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user