diff options
Diffstat (limited to 'net/bluetooth/hci_sysfs.c')
-rw-r--r-- | net/bluetooth/hci_sysfs.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/net/bluetooth/hci_sysfs.c b/net/bluetooth/hci_sysfs.c index 2726adc419d3..e13cf5ef144c 100644 --- a/net/bluetooth/hci_sysfs.c +++ b/net/bluetooth/hci_sysfs.c | |||
@@ -282,6 +282,7 @@ static void add_conn(struct work_struct *work) | |||
282 | int i; | 282 | int i; |
283 | 283 | ||
284 | flush_workqueue(btdelconn); | 284 | flush_workqueue(btdelconn); |
285 | |||
285 | if (device_add(&conn->dev) < 0) { | 286 | if (device_add(&conn->dev) < 0) { |
286 | BT_ERR("Failed to register connection device"); | 287 | BT_ERR("Failed to register connection device"); |
287 | return; | 288 | return; |
@@ -317,7 +318,6 @@ void hci_conn_add_sysfs(struct hci_conn *conn) | |||
317 | INIT_WORK(&conn->work, add_conn); | 318 | INIT_WORK(&conn->work, add_conn); |
318 | 319 | ||
319 | queue_work(btaddconn, &conn->work); | 320 | queue_work(btaddconn, &conn->work); |
320 | schedule_work(&conn->work); | ||
321 | } | 321 | } |
322 | 322 | ||
323 | static int __match_tty(struct device *dev, void *data) | 323 | static int __match_tty(struct device *dev, void *data) |
@@ -354,7 +354,6 @@ void hci_conn_del_sysfs(struct hci_conn *conn) | |||
354 | INIT_WORK(&conn->work, del_conn); | 354 | INIT_WORK(&conn->work, del_conn); |
355 | 355 | ||
356 | queue_work(btdelconn, &conn->work); | 356 | queue_work(btdelconn, &conn->work); |
357 | schedule_work(&conn->work); | ||
358 | } | 357 | } |
359 | 358 | ||
360 | int hci_register_sysfs(struct hci_dev *hdev) | 359 | int hci_register_sysfs(struct hci_dev *hdev) |
@@ -408,6 +407,7 @@ int __init bt_sysfs_init(void) | |||
408 | err = -ENOMEM; | 407 | err = -ENOMEM; |
409 | goto out; | 408 | goto out; |
410 | } | 409 | } |
410 | |||
411 | btdelconn = create_singlethread_workqueue("btdelconn"); | 411 | btdelconn = create_singlethread_workqueue("btdelconn"); |
412 | if (!btdelconn) { | 412 | if (!btdelconn) { |
413 | err = -ENOMEM; | 413 | err = -ENOMEM; |
@@ -447,8 +447,12 @@ out: | |||
447 | void bt_sysfs_cleanup(void) | 447 | void bt_sysfs_cleanup(void) |
448 | { | 448 | { |
449 | destroy_workqueue(btaddconn); | 449 | destroy_workqueue(btaddconn); |
450 | |||
450 | destroy_workqueue(btdelconn); | 451 | destroy_workqueue(btdelconn); |
452 | |||
451 | class_destroy(bt_class); | 453 | class_destroy(bt_class); |
454 | |||
452 | bus_unregister(&bt_bus); | 455 | bus_unregister(&bt_bus); |
456 | |||
453 | platform_device_unregister(bt_platform); | 457 | platform_device_unregister(bt_platform); |
454 | } | 458 | } |