Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 352244
b: refs/heads/master
c: 6ead1bb
h: refs/heads/master
v: v3
  • Loading branch information
Johan Hedberg authored and Gustavo Padovan committed Jan 18, 2013
1 parent a6bf211 commit 1200287
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 52e0b011e29f36bc5c02ea3adbf4d864a38373de
refs/heads/master: 6ead1bbc381a674c20f227dbe6f3a8c6f67ce7a2
1 change: 1 addition & 0 deletions trunk/include/net/bluetooth/hci_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ struct hci_dev {
unsigned long le_last_tx;

struct workqueue_struct *workqueue;
struct workqueue_struct *req_workqueue;

struct work_struct power_on;
struct delayed_work power_off;
Expand Down
11 changes: 11 additions & 0 deletions trunk/net/bluetooth/hci_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1799,6 +1799,15 @@ int hci_register_dev(struct hci_dev *hdev)
goto err;
}

hdev->req_workqueue = alloc_workqueue(hdev->name,
WQ_HIGHPRI | WQ_UNBOUND |
WQ_MEM_RECLAIM, 1);
if (!hdev->req_workqueue) {
destroy_workqueue(hdev->workqueue);
error = -ENOMEM;
goto err;
}

error = hci_add_sysfs(hdev);
if (error < 0)
goto err_wqueue;
Expand Down Expand Up @@ -1827,6 +1836,7 @@ int hci_register_dev(struct hci_dev *hdev)

err_wqueue:
destroy_workqueue(hdev->workqueue);
destroy_workqueue(hdev->req_workqueue);
err:
ida_simple_remove(&hci_index_ida, hdev->id);
write_lock(&hci_dev_list_lock);
Expand Down Expand Up @@ -1880,6 +1890,7 @@ void hci_unregister_dev(struct hci_dev *hdev)
hci_del_sysfs(hdev);

destroy_workqueue(hdev->workqueue);
destroy_workqueue(hdev->req_workqueue);

hci_dev_lock(hdev);
hci_blacklist_clear(hdev);
Expand Down

0 comments on commit 1200287

Please sign in to comment.