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

Commit 142037fc authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "bluetooth: Add HCI device to device list after initialization"

parents 0b8a5c89 52f33ca8
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -2217,10 +2217,6 @@ int hci_register_dev(struct hci_dev *hdev)

	BT_DBG("%p name %s bus %d", hdev, hdev->name, hdev->bus);

	write_lock(&hci_dev_list_lock);
	list_add(&hdev->list, &hci_dev_list);
	write_unlock(&hci_dev_list_lock);

	hdev->workqueue = alloc_workqueue(hdev->name, WQ_HIGHPRI | WQ_UNBOUND |
					  WQ_MEM_RECLAIM, 1);
	if (!hdev->workqueue) {
@@ -2259,6 +2255,10 @@ int hci_register_dev(struct hci_dev *hdev)
	if (hdev->dev_type != HCI_AMP)
		set_bit(HCI_AUTO_OFF, &hdev->dev_flags);

	write_lock(&hci_dev_list_lock);
	list_add(&hdev->list, &hci_dev_list);
	write_unlock(&hci_dev_list_lock);

	hci_notify(hdev, HCI_DEV_REG);
	hci_dev_hold(hdev);