diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2015-03-13 05:11:02 -0400 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2015-03-13 06:09:27 -0400 |
commit | a358dc11d80ecaca443aa1fd2fd9d4f3425922e7 (patch) | |
tree | b59d2b813fad4a63b3e33b94e4668b79a6a92885 /net/bluetooth/hci_sock.c | |
parent | a1536da255f16f42b8f069b2769134b32558b265 (diff) |
Bluetooth: Introduce hci_dev_clear_flag helper macro
Instead of manually coding clear_bit on hdev->dev_flags all the time,
use hci_dev_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_sock.c')
-rw-r--r-- | net/bluetooth/hci_sock.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/bluetooth/hci_sock.c b/net/bluetooth/hci_sock.c index b297709d82bf..ca402a0a6740 100644 --- a/net/bluetooth/hci_sock.c +++ b/net/bluetooth/hci_sock.c | |||
@@ -474,7 +474,7 @@ static int hci_sock_release(struct socket *sock) | |||
474 | if (hdev) { | 474 | if (hdev) { |
475 | if (hci_pi(sk)->channel == HCI_CHANNEL_USER) { | 475 | if (hci_pi(sk)->channel == HCI_CHANNEL_USER) { |
476 | mgmt_index_added(hdev); | 476 | mgmt_index_added(hdev); |
477 | clear_bit(HCI_USER_CHANNEL, &hdev->dev_flags); | 477 | hci_dev_clear_flag(hdev, HCI_USER_CHANNEL); |
478 | hci_dev_close(hdev->id); | 478 | hci_dev_close(hdev->id); |
479 | } | 479 | } |
480 | 480 | ||
@@ -730,7 +730,7 @@ static int hci_sock_bind(struct socket *sock, struct sockaddr *addr, | |||
730 | 730 | ||
731 | err = hci_dev_open(hdev->id); | 731 | err = hci_dev_open(hdev->id); |
732 | if (err) { | 732 | if (err) { |
733 | clear_bit(HCI_USER_CHANNEL, &hdev->dev_flags); | 733 | hci_dev_clear_flag(hdev, HCI_USER_CHANNEL); |
734 | mgmt_index_added(hdev); | 734 | mgmt_index_added(hdev); |
735 | hci_dev_put(hdev); | 735 | hci_dev_put(hdev); |
736 | goto done; | 736 | goto done; |