diff options
Diffstat (limited to 'drivers/gpu/drm/drm_stub.c')
-rw-r--r-- | drivers/gpu/drm/drm_stub.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_stub.c b/drivers/gpu/drm/drm_stub.c index 45a536b9d7f5..d009661781bc 100644 --- a/drivers/gpu/drm/drm_stub.c +++ b/drivers/gpu/drm/drm_stub.c | |||
@@ -50,6 +50,7 @@ struct idr drm_minors_idr; | |||
50 | 50 | ||
51 | struct class *drm_class; | 51 | struct class *drm_class; |
52 | struct proc_dir_entry *drm_proc_root; | 52 | struct proc_dir_entry *drm_proc_root; |
53 | struct dentry *drm_debugfs_root; | ||
53 | 54 | ||
54 | static int drm_minor_get_id(struct drm_device *dev, int type) | 55 | static int drm_minor_get_id(struct drm_device *dev, int type) |
55 | { | 56 | { |
@@ -313,7 +314,15 @@ static int drm_get_minor(struct drm_device *dev, struct drm_minor **minor, int t | |||
313 | goto err_mem; | 314 | goto err_mem; |
314 | } | 315 | } |
315 | } else | 316 | } else |
316 | new_minor->dev_root = NULL; | 317 | new_minor->proc_root = NULL; |
318 | |||
319 | #if defined(CONFIG_DEBUG_FS) | ||
320 | ret = drm_debugfs_init(new_minor, minor_id, drm_debugfs_root); | ||
321 | if (ret) { | ||
322 | DRM_ERROR("DRM: Failed to initialize /debugfs/dri.\n"); | ||
323 | goto err_g2; | ||
324 | } | ||
325 | #endif | ||
317 | 326 | ||
318 | ret = drm_sysfs_device_add(new_minor); | 327 | ret = drm_sysfs_device_add(new_minor); |
319 | if (ret) { | 328 | if (ret) { |
@@ -430,6 +439,10 @@ int drm_put_minor(struct drm_minor **minor_p) | |||
430 | 439 | ||
431 | if (minor->type == DRM_MINOR_LEGACY) | 440 | if (minor->type == DRM_MINOR_LEGACY) |
432 | drm_proc_cleanup(minor, drm_proc_root); | 441 | drm_proc_cleanup(minor, drm_proc_root); |
442 | #if defined(CONFIG_DEBUG_FS) | ||
443 | drm_debugfs_cleanup(minor); | ||
444 | #endif | ||
445 | |||
433 | drm_sysfs_device_remove(minor); | 446 | drm_sysfs_device_remove(minor); |
434 | 447 | ||
435 | idr_remove(&drm_minors_idr, minor->index); | 448 | idr_remove(&drm_minors_idr, minor->index); |