Skip to content

Commit

Permalink
Bluetooth: Use system workqueue to schedule power_on
Browse files Browse the repository at this point in the history
hdev->workqueue should be only for rx/tx, so move this one out.

Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
  • Loading branch information
Gustavo F. Padovan committed Dec 18, 2011
1 parent 6d438e3 commit 7f97104
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion net/bluetooth/hci_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1522,7 +1522,7 @@ int hci_register_dev(struct hci_dev *hdev)

set_bit(HCI_AUTO_OFF, &hdev->flags);
set_bit(HCI_SETUP, &hdev->flags);
queue_work(hdev->workqueue, &hdev->power_on);
schedule_work(&hdev->power_on);

hci_notify(hdev, HCI_DEV_REG);

Expand Down
2 changes: 1 addition & 1 deletion net/bluetooth/mgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ static int set_powered(struct sock *sk, u16 index, unsigned char *data, u16 len)
}

if (cp->val)
queue_work(hdev->workqueue, &hdev->power_on);
schedule_work(&hdev->power_on);
else
schedule_work(&hdev->power_off.work);

Expand Down

0 comments on commit 7f97104

Please sign in to comment.