Skip to content

Commit

Permalink
Bluetooth: move power_off to system workqueue
Browse files Browse the repository at this point in the history
hdev->workqueue will be only for for rx/tx/cmd processing, all other small
works should go to the system workqueue for now.

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 3d57dc6 commit 80b7ab3
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 @@ -937,7 +937,7 @@ static void hci_power_on(struct work_struct *work)
return;

if (test_bit(HCI_AUTO_OFF, &hdev->flags))
queue_delayed_work(hdev->workqueue, &hdev->power_off,
schedule_delayed_work(&hdev->power_off,
msecs_to_jiffies(AUTO_OFF_TIMEOUT));

if (test_and_clear_bit(HCI_SETUP, &hdev->flags))
Expand Down
2 changes: 1 addition & 1 deletion net/bluetooth/mgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,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);
else
queue_work(hdev->workqueue, &hdev->power_off.work);
schedule_work(&hdev->power_off.work);

err = 0;

Expand Down

0 comments on commit 80b7ab3

Please sign in to comment.