summaryrefslogtreecommitdiffstats
path: root/net/bluetooth/hci_core.c
diff options
context:
space:
mode:
authorAndre Guedes <andre.guedes@openbossa.org>2012-02-03 17:47:58 -0300
committerJohan Hedberg <johan.hedberg@intel.com>2012-02-13 17:01:34 +0200
commit6fbe195dc41c4fae1fa7aca1a38c888de1d24e2d (patch)
treeb5435e95b512dae5861da07bd1daeddcdd1f7d97 /net/bluetooth/hci_core.c
parentc599008f8f999dab8cb4a6404be99bdc4716ba15 (diff)
downloadop-kernel-dev-6fbe195dc41c4fae1fa7aca1a38c888de1d24e2d.zip
op-kernel-dev-6fbe195dc41c4fae1fa7aca1a38c888de1d24e2d.tar.gz
Bluetooth: Minor code refactoring
This patch does a trivial code refacting in hci_discovery_active. Signed-off-by: Andre Guedes <andre.guedes@openbossa.org> Acked-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.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 1705d93..1175f27 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -360,12 +360,15 @@ bool hci_discovery_active(struct hci_dev *hdev)
{
struct discovery_state *discov = &hdev->discovery;
- if (discov->state == DISCOVERY_INQUIRY ||
- discov->state == DISCOVERY_LE_SCAN ||
- discov->state == DISCOVERY_RESOLVING)
+ switch (discov->state) {
+ case DISCOVERY_INQUIRY:
+ case DISCOVERY_LE_SCAN:
+ case DISCOVERY_RESOLVING:
return true;
- return false;
+ default:
+ return false;
+ }
}
void hci_discovery_set_state(struct hci_dev *hdev, int state)
OpenPOWER on IntegriCloud