diff options
author | Christian König <christian.koenig@amd.com> | 2020-12-18 21:55:08 +0300 |
---|---|---|
committer | Christian König <christian.koenig@amd.com> | 2021-02-09 19:28:01 +0300 |
commit | ed89fff973828d3f36f4577d8ea8d5a48794fca5 (patch) | |
tree | 672fbe70d898e1c9aefb83746e97f7588b01ba82 /drivers/gpu/drm/ttm | |
parent | f07069da6b4c5f937d6df2de6504394845513964 (diff) | |
download | linux-ed89fff973828d3f36f4577d8ea8d5a48794fca5.tar.xz |
drm/ttm: drop sysfs directory
Not used any more.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20210208133226.36955-3-christian.koenig@amd.com
Diffstat (limited to 'drivers/gpu/drm/ttm')
-rw-r--r-- | drivers/gpu/drm/ttm/ttm_module.c | 50 | ||||
-rw-r--r-- | drivers/gpu/drm/ttm/ttm_module.h | 2 |
2 files changed, 0 insertions, 52 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_module.c b/drivers/gpu/drm/ttm/ttm_module.c index f6566603a60f..56b0efdba1a9 100644 --- a/drivers/gpu/drm/ttm/ttm_module.c +++ b/drivers/gpu/drm/ttm/ttm_module.c @@ -37,66 +37,16 @@ #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", - /** - * Add pm ops here. - */ -}; - -static void ttm_drm_class_device_release(struct device *dev) -{ - atomic_set(&device_released, 1); - wake_up_all(&exit_q); -} - -static struct device ttm_drm_class_device = { - .type = &ttm_drm_class_type, - .release = &ttm_drm_class_device_release -}; - -struct kobject *ttm_get_kobj(void) -{ - struct kobject *kobj = &ttm_drm_class_device.kobj; - BUG_ON(kobj == NULL); - return kobj; -} - static int __init ttm_init(void) { - int ret; - - ret = dev_set_name(&ttm_drm_class_device, "ttm"); - if (unlikely(ret != 0)) - return ret; - - atomic_set(&device_released, 0); - ret = drm_class_device_register(&ttm_drm_class_device); - 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); - wake_up_all(&exit_q); - return ret; } static void __exit ttm_exit(void) { - drm_class_device_unregister(&ttm_drm_class_device); - - /** - * Refuse to unload until the TTM device is released. - * Not sure this is 100% needed. - */ - - wait_event(exit_q, atomic_read(&device_released) == 1); debugfs_remove(ttm_debugfs_root); } diff --git a/drivers/gpu/drm/ttm/ttm_module.h b/drivers/gpu/drm/ttm/ttm_module.h index 2f03c2fcf570..d7cac5d4b835 100644 --- a/drivers/gpu/drm/ttm/ttm_module.h +++ b/drivers/gpu/drm/ttm/ttm_module.h @@ -33,10 +33,8 @@ #define TTM_PFX "[TTM] " -struct kobject; struct dentry; -extern struct kobject *ttm_get_kobj(void); extern struct dentry *ttm_debugfs_root; #endif /* _TTM_MODULE_H_ */ |