提交 6fbe195d 编写于 作者: A Andre Guedes 提交者: Johan Hedberg

Bluetooth: Minor code refactoring

This patch does a trivial code refacting in hci_discovery_active.
Signed-off-by: NAndre Guedes <andre.guedes@openbossa.org>
Acked-by: NMarcel Holtmann <marcel@holtmann.org>
Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
上级 c599008f
...@@ -360,12 +360,15 @@ bool hci_discovery_active(struct hci_dev *hdev) ...@@ -360,12 +360,15 @@ bool hci_discovery_active(struct hci_dev *hdev)
{ {
struct discovery_state *discov = &hdev->discovery; struct discovery_state *discov = &hdev->discovery;
if (discov->state == DISCOVERY_INQUIRY || switch (discov->state) {
discov->state == DISCOVERY_LE_SCAN || case DISCOVERY_INQUIRY:
discov->state == DISCOVERY_RESOLVING) case DISCOVERY_LE_SCAN:
case DISCOVERY_RESOLVING:
return true; return true;
return false; default:
return false;
}
} }
void hci_discovery_set_state(struct hci_dev *hdev, int state) void hci_discovery_set_state(struct hci_dev *hdev, int state)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册