summaryrefslogtreecommitdiffstats
path: root/net/bluetooth/hci_sock.c
diff options
context:
space:
mode:
authorMarcel Holtmann2015-03-13 10:11:06 +0100
committerJohan Hedberg2015-03-13 11:09:33 +0100
commit238be788fcb75870661ec165dc90f2a2674e7fcb (patch)
treebdeac71cdc22c7594e29df3daf678a486d048c4f /net/bluetooth/hci_sock.c
parentBluetooth: Introduce hci_dev_test_and_clear_flag helper macro (diff)
downloadkernel-qcow2-linux-238be788fcb75870661ec165dc90f2a2674e7fcb.tar.gz
kernel-qcow2-linux-238be788fcb75870661ec165dc90f2a2674e7fcb.tar.xz
kernel-qcow2-linux-238be788fcb75870661ec165dc90f2a2674e7fcb.zip
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>
Diffstat (limited to 'net/bluetooth/hci_sock.c')
-rw-r--r--net/bluetooth/hci_sock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bluetooth/hci_sock.c b/net/bluetooth/hci_sock.c
index ca402a0a6740..b614543b4fe3 100644
--- a/net/bluetooth/hci_sock.c
+++ b/net/bluetooth/hci_sock.c
@@ -720,7 +720,7 @@ static int hci_sock_bind(struct socket *sock, struct sockaddr *addr,
goto done;
}
- if (test_and_set_bit(HCI_USER_CHANNEL, &hdev->dev_flags)) {
+ if (hci_dev_test_and_set_flag(hdev, HCI_USER_CHANNEL)) {
err = -EUSERS;
hci_dev_put(hdev);
goto done;