summaryrefslogtreecommitdiff
path: root/net/bluetooth/mgmt.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2011-11-09 01:44:22 +0200
committerGustavo F. Padovan <padovan@profusion.mobi>2011-11-09 12:33:52 -0200
commite0f9309f371096b82ad35aa2c27d7f848f37e696 (patch)
tree37559bcc4c1df1a8d0b69255a45cd265ccb24da3 /net/bluetooth/mgmt.c
parent56e5cb86eb377970825486a5861f5926d65e64c1 (diff)
Bluetooth: Fix cancel_delayed_work_sync usage with locks
The cancel_delayed_work_sync function should not be used if we hold any locks. Luckily all places where this is the case it is also safe to use the non-sync version. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'net/bluetooth/mgmt.c')
-rw-r--r--net/bluetooth/mgmt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index be4c3d03d808..263fa2745d48 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -149,7 +149,7 @@ static int read_index_list(struct sock *sk)
i = 0;
list_for_each_entry(d, &hci_dev_list, list) {
if (test_and_clear_bit(HCI_AUTO_OFF, &d->flags))
- cancel_delayed_work_sync(&d->power_off);
+ cancel_delayed_work(&d->power_off);
if (test_bit(HCI_SETUP, &d->flags))
continue;
@@ -398,7 +398,7 @@ static int set_discoverable(struct sock *sk, u16 index, unsigned char *data,
if (cp->val)
scan |= SCAN_INQUIRY;
else
- cancel_delayed_work_sync(&hdev->discov_off);
+ cancel_delayed_work(&hdev->discov_off);
err = hci_send_cmd(hdev, HCI_OP_WRITE_SCAN_ENABLE, 1, &scan);
if (err < 0)