|
@@ -14,8 +14,6 @@ static struct class *bt_class;
|
|
struct dentry *bt_debugfs = NULL;
|
|
struct dentry *bt_debugfs = NULL;
|
|
EXPORT_SYMBOL_GPL(bt_debugfs);
|
|
EXPORT_SYMBOL_GPL(bt_debugfs);
|
|
|
|
|
|
-static struct workqueue_struct *bt_workq;
|
|
|
|
-
|
|
|
|
static inline char *link_typetostr(int type)
|
|
static inline char *link_typetostr(int type)
|
|
{
|
|
{
|
|
switch (type) {
|
|
switch (type) {
|
|
@@ -161,14 +159,14 @@ void hci_conn_add_sysfs(struct hci_conn *conn)
|
|
{
|
|
{
|
|
BT_DBG("conn %p", conn);
|
|
BT_DBG("conn %p", conn);
|
|
|
|
|
|
- queue_work(bt_workq, &conn->work_add);
|
|
|
|
|
|
+ queue_work(conn->hdev->workqueue, &conn->work_add);
|
|
}
|
|
}
|
|
|
|
|
|
void hci_conn_del_sysfs(struct hci_conn *conn)
|
|
void hci_conn_del_sysfs(struct hci_conn *conn)
|
|
{
|
|
{
|
|
BT_DBG("conn %p", conn);
|
|
BT_DBG("conn %p", conn);
|
|
|
|
|
|
- queue_work(bt_workq, &conn->work_del);
|
|
|
|
|
|
+ queue_work(conn->hdev->workqueue, &conn->work_del);
|
|
}
|
|
}
|
|
|
|
|
|
static inline char *host_bustostr(int bus)
|
|
static inline char *host_bustostr(int bus)
|
|
@@ -487,17 +485,11 @@ void hci_unregister_sysfs(struct hci_dev *hdev)
|
|
|
|
|
|
int __init bt_sysfs_init(void)
|
|
int __init bt_sysfs_init(void)
|
|
{
|
|
{
|
|
- bt_workq = create_singlethread_workqueue("bluetooth");
|
|
|
|
- if (!bt_workq)
|
|
|
|
- return -ENOMEM;
|
|
|
|
-
|
|
|
|
bt_debugfs = debugfs_create_dir("bluetooth", NULL);
|
|
bt_debugfs = debugfs_create_dir("bluetooth", NULL);
|
|
|
|
|
|
bt_class = class_create(THIS_MODULE, "bluetooth");
|
|
bt_class = class_create(THIS_MODULE, "bluetooth");
|
|
- if (IS_ERR(bt_class)) {
|
|
|
|
- destroy_workqueue(bt_workq);
|
|
|
|
|
|
+ if (IS_ERR(bt_class))
|
|
return PTR_ERR(bt_class);
|
|
return PTR_ERR(bt_class);
|
|
- }
|
|
|
|
|
|
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
@@ -507,6 +499,4 @@ void bt_sysfs_cleanup(void)
|
|
class_destroy(bt_class);
|
|
class_destroy(bt_class);
|
|
|
|
|
|
debugfs_remove_recursive(bt_debugfs);
|
|
debugfs_remove_recursive(bt_debugfs);
|
|
-
|
|
|
|
- destroy_workqueue(bt_workq);
|
|
|
|
}
|
|
}
|