int i;
flush_workqueue(btdelconn);
+
if (device_add(&conn->dev) < 0) {
BT_ERR("Failed to register connection device");
return;
INIT_WORK(&conn->work, add_conn);
queue_work(btaddconn, &conn->work);
- schedule_work(&conn->work);
}
static int __match_tty(struct device *dev, void *data)
INIT_WORK(&conn->work, del_conn);
queue_work(btdelconn, &conn->work);
- schedule_work(&conn->work);
}
int hci_register_sysfs(struct hci_dev *hdev)
err = -ENOMEM;
goto out;
}
+
btdelconn = create_singlethread_workqueue("btdelconn");
if (!btdelconn) {
err = -ENOMEM;
void bt_sysfs_cleanup(void)
{
destroy_workqueue(btaddconn);
+
destroy_workqueue(btdelconn);
+
class_destroy(bt_class);
+
bus_unregister(&bt_bus);
+
platform_device_unregister(bt_platform);
}