summaryrefslogtreecommitdiffstats
path: root/net/bluetooth/hci_core.c
diff options
context:
space:
mode:
authorMarcel Holtmann2013-10-06 17:25:01 +0200
committerJohan Hedberg2013-10-06 17:58:45 +0200
commit1514b8928e5d8273920b26276cd9617b6dbc7760 (patch)
treef4f082493e65798b1c513d649dcf5cb5caffd660 /net/bluetooth/hci_core.c
parentBluetooth: Remove no longer needed mgmt_new_settings() function (diff)
downloadkernel-qcow2-linux-1514b8928e5d8273920b26276cd9617b6dbc7760.tar.gz
kernel-qcow2-linux-1514b8928e5d8273920b26276cd9617b6dbc7760.tar.xz
kernel-qcow2-linux-1514b8928e5d8273920b26276cd9617b6dbc7760.zip
Bluetooth: Remove mgmt_valid_hdev() helper function
The helper function mgmt_valid_hdev() is more obfuscating the code then it makes it easier to read. So intead of this helper, use the direct check for BR/EDR device type. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'net/bluetooth/hci_core.c')
-rw-r--r--net/bluetooth/hci_core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index bf3c5b0c22b9..d9626aad7ade 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -1254,7 +1254,7 @@ static int hci_dev_do_open(struct hci_dev *hdev)
hci_notify(hdev, HCI_DEV_UP);
if (!test_bit(HCI_SETUP, &hdev->dev_flags) &&
!test_bit(HCI_USER_CHANNEL, &hdev->dev_flags) &&
- mgmt_valid_hdev(hdev)) {
+ hdev->dev_type == HCI_BREDR) {
hci_dev_lock(hdev);
mgmt_powered(hdev, 1);
hci_dev_unlock(hdev);
@@ -1394,7 +1394,7 @@ static int hci_dev_do_close(struct hci_dev *hdev)
hdev->dev_flags &= ~HCI_PERSISTENT_MASK;
if (!test_and_clear_bit(HCI_AUTO_OFF, &hdev->dev_flags) &&
- mgmt_valid_hdev(hdev)) {
+ hdev->dev_type == HCI_BREDR) {
hci_dev_lock(hdev);
mgmt_powered(hdev, 0);
hci_dev_unlock(hdev);