aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2015-03-13 02:11:03 -0700
committerJohan Hedberg <johan.hedberg@intel.com>2015-03-13 12:09:29 +0200
commitce05d603af7c9b5be66a1f3358443e20e2a2ae7a (patch)
tree095536c740a1ae211e5adb49a03124a466e4d7f4 /net
parentBluetooth: Introduce hci_dev_clear_flag helper macro (diff)
downloadlinux-dev-ce05d603af7c9b5be66a1f3358443e20e2a2ae7a.tar.xz
linux-dev-ce05d603af7c9b5be66a1f3358443e20e2a2ae7a.zip
Bluetooth: Introduce hci_dev_change_flag helper macro
Instead of manually coding change_bit on hdev->dev_flags all the time, use hci_dev_change_flag helper macro. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'net')
-rw-r--r--net/bluetooth/mgmt.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index aa233e37fc93..c3af3b87dbb5 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -1674,7 +1674,7 @@ static int set_discoverable(struct sock *sk, struct hci_dev *hdev, void *data,
* and so no need to check HCI_LIMITED_DISCOVERABLE.
*/
if (!!cp->val != hci_dev_test_flag(hdev, HCI_DISCOVERABLE)) {
- change_bit(HCI_DISCOVERABLE, &hdev->dev_flags);
+ hci_dev_change_flag(hdev, HCI_DISCOVERABLE);
changed = true;
}
@@ -2046,7 +2046,7 @@ static int set_link_security(struct sock *sk, struct hci_dev *hdev, void *data,
bool changed = false;
if (!!cp->val != hci_dev_test_flag(hdev, HCI_LINK_SECURITY)) {
- change_bit(HCI_LINK_SECURITY, &hdev->dev_flags);
+ hci_dev_change_flag(hdev, HCI_LINK_SECURITY);
changed = true;
}
@@ -2301,7 +2301,7 @@ static int set_le(struct sock *sk, struct hci_dev *hdev, void *data, u16 len)
bool changed = false;
if (val != hci_dev_test_flag(hdev, HCI_LE_ENABLED)) {
- change_bit(HCI_LE_ENABLED, &hdev->dev_flags);
+ hci_dev_change_flag(hdev, HCI_LE_ENABLED);
changed = true;
}
@@ -4689,7 +4689,7 @@ static int set_fast_connectable(struct sock *sk, struct hci_dev *hdev,
}
if (!hdev_is_powered(hdev)) {
- change_bit(HCI_FAST_CONNECTABLE, &hdev->dev_flags);
+ hci_dev_change_flag(hdev, HCI_FAST_CONNECTABLE);
err = send_settings_rsp(sk, MGMT_OP_SET_FAST_CONNECTABLE,
hdev);
new_settings(hdev, sk);
@@ -4789,7 +4789,7 @@ static int set_bredr(struct sock *sk, struct hci_dev *hdev, void *data, u16 len)
hci_dev_clear_flag(hdev, HCI_HS_ENABLED);
}
- change_bit(HCI_BREDR_ENABLED, &hdev->dev_flags);
+ hci_dev_change_flag(hdev, HCI_BREDR_ENABLED);
err = send_settings_rsp(sk, MGMT_OP_SET_BREDR, hdev);
if (err < 0)