Bluetooth: Introduce hci_dev_test_and_set_flag helper macro
Instead of manually coding test_and_set_bit on hdev->dev_flags all the time, use hci_dev_test_and_set_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
a69d892726
commit
238be788fc
4 changed files with 26 additions and 31 deletions
|
|
@ -507,6 +507,7 @@ extern struct mutex hci_cb_list_lock;
|
|||
#define hci_dev_change_flag(hdev, nr) change_bit((nr), &(hdev)->dev_flags)
|
||||
#define hci_dev_test_flag(hdev, nr) test_bit((nr), &(hdev)->dev_flags)
|
||||
|
||||
#define hci_dev_test_and_set_flag(hdev, nr) test_and_set_bit((nr), &(hdev)->dev_flags)
|
||||
#define hci_dev_test_and_clear_flag(hdev, nr) test_and_clear_bit((nr), &(hdev)->dev_flags)
|
||||
#define hci_dev_test_and_change_flag(hdev, nr) test_and_change_bit((nr), &(hdev)->dev_flags)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue