Bluetooth: move power_off to system workqueue
authorGustavo F. Padovan <padovan@profusion.mobi>
Sat, 17 Dec 2011 16:52:27 +0000 (14:52 -0200)
committerGustavo F. Padovan <padovan@profusion.mobi>
Sun, 18 Dec 2011 19:07:58 +0000 (17:07 -0200)
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>
net/bluetooth/hci_core.c
net/bluetooth/mgmt.c

index 2b20941ebcb1a087e415228431d2531b0bafba7c..a14a60d5890be6f691656053e006f3030bc6143c 100644 (file)
@@ -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))
index ad4817c9ef2f8423338176015fec671a4827eafe..f4af6593c4318131b17840db1a46577a30e5f192 100644 (file)
@@ -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;