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

Commit 46818ed5 authored by Johan Hedberg's avatar Johan Hedberg Committed by Gustavo Padovan
Browse files

Bluetooth: Fix using system-global workqueue when not necessary



There's a per-HCI device workqueue (hdev->workqueue) that should be used
for general per-HCI device work (except hdev->req_workqueue that's for
hci_request() related work). This patch fixes places using the
system-global work queue and makes them use the hdev->workqueue instead.

Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
Acked-by: default avatarMarcel Holtmann <marcel@holtmann.org>
Signed-off-by: default avatarGustavo Padovan <gustavo.padovan@collabora.co.uk>
parent 19202573
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1622,7 +1622,7 @@ static int hci_do_le_scan(struct hci_dev *hdev, u8 type, u16 interval,
	if (err < 0)
		return err;

	schedule_delayed_work(&hdev->le_scan_disable,
	queue_delayed_work(hdev->workqueue, &hdev->le_scan_disable,
			   msecs_to_jiffies(timeout));

	return 0;
+2 −1
Original line number Diff line number Diff line
@@ -1361,7 +1361,8 @@ static bool enable_service_cache(struct hci_dev *hdev)
		return false;

	if (!test_and_set_bit(HCI_SERVICE_CACHE, &hdev->dev_flags)) {
		schedule_delayed_work(&hdev->service_cache, CACHE_TIMEOUT);
		queue_delayed_work(hdev->workqueue, &hdev->service_cache,
				   CACHE_TIMEOUT);
		return true;
	}