summaryrefslogtreecommitdiff
path: root/net/bluetooth/hci_request.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2015-03-13 02:11:05 -0700
committerJohan Hedberg <johan.hedberg@intel.com>2015-03-13 12:09:32 +0200
commita69d89272698d1c31ccb78348562af6461cf1eb7 (patch)
tree1474d52857b9bbc0af82385754037e5633f24b1d /net/bluetooth/hci_request.c
parent516018a9c057a7c179dd6b4df917a6f5d43b3547 (diff)
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>
Diffstat (limited to 'net/bluetooth/hci_request.c')
-rw-r--r--net/bluetooth/hci_request.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bluetooth/hci_request.c b/net/bluetooth/hci_request.c
index fd7b2a97740b..e85f9ec9f73a 100644
--- a/net/bluetooth/hci_request.c
+++ b/net/bluetooth/hci_request.c
@@ -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;