mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-20 21:51:05 +00:00
Bluetooth: Introduce hci_dev_test_and_clear_flag helper macro
Instead of manually coding test_and_clear_bit on hdev->dev_flags all the time, use hci_dev_test_and_clear_flag helper macro. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
parent
516018a9c0
commit
a69d892726
5 changed files with 44 additions and 48 deletions
|
@ -329,7 +329,7 @@ int hci_update_random_address(struct hci_request *req, bool require_privacy,
|
|||
|
||||
*own_addr_type = ADDR_LE_DEV_RANDOM;
|
||||
|
||||
if (!test_and_clear_bit(HCI_RPA_EXPIRED, &hdev->dev_flags) &&
|
||||
if (!hci_dev_test_and_clear_flag(hdev, HCI_RPA_EXPIRED) &&
|
||||
!bacmp(&hdev->random_addr, &hdev->rpa))
|
||||
return 0;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue