Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -360,13 +360,16 @@ 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;

	default:
		return false;
	}
}

void hci_discovery_set_state(struct hci_dev *hdev, int state)
{