#include <linux/module.h>
#include <linux/device.h>
#include <linux/sched.h>
+#include <linux/debugfs.h>
#include <drm/drm_sysfs.h>
#include "ttm_module.h"
static DECLARE_WAIT_QUEUE_HEAD(exit_q);
static atomic_t device_released;
+struct dentry *ttm_debugfs_root;
static struct device_type ttm_drm_class_type = {
.name = "ttm",
if (unlikely(ret != 0))
goto out_no_dev_reg;
+ ttm_debugfs_root = debugfs_create_dir("ttm", NULL);
return 0;
out_no_dev_reg:
atomic_set(&device_released, 1);
*/
wait_event(exit_q, atomic_read(&device_released) == 1);
+ debugfs_remove(ttm_debugfs_root);
}
module_init(ttm_init);