Commit 6fbe195d authored by Andre Guedes's avatar Andre Guedes Committed by Johan Hedberg

Bluetooth: Minor code refactoring

This patch does a trivial code refacting in hci_discovery_active.
Signed-off-by: default avatarAndre Guedes <andre.guedes@openbossa.org>
Acked-by: default avatarMarcel Holtmann <marcel@holtmann.org>
Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
parent c599008f
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment