Skip to content

Commit

Permalink
drm: remove unneeded #ifdef CONFIG_DEBUGFS
Browse files Browse the repository at this point in the history
No need to check for DEBUGFS, we already have dummy-fallbacks in our
headers.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
  • Loading branch information
David Herrmann committed Mar 16, 2014
1 parent afcdbc8 commit cb0f932
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions drivers/gpu/drm/drm_stub.c
Original file line number Diff line number Diff line change
Expand Up @@ -323,13 +323,11 @@ static int drm_minor_register(struct drm_device *dev, unsigned int type)

idr_replace(&drm_minors_idr, new_minor, minor_id);

#if defined(CONFIG_DEBUG_FS)
ret = drm_debugfs_init(new_minor, minor_id, drm_debugfs_root);
if (ret) {
DRM_ERROR("DRM: Failed to initialize /sys/kernel/debug/dri.\n");
goto err_mem;
}
#endif

ret = drm_sysfs_device_add(new_minor);
if (ret) {
Expand All @@ -343,10 +341,8 @@ static int drm_minor_register(struct drm_device *dev, unsigned int type)


err_debugfs:
#if defined(CONFIG_DEBUG_FS)
drm_debugfs_cleanup(new_minor);
err_mem:
#endif
idr_remove(&drm_minors_idr, minor_id);
return ret;
}
Expand All @@ -359,10 +355,7 @@ static void drm_minor_unregister(struct drm_device *dev, unsigned int type)
if (!minor || !minor->kdev)
return;

#if defined(CONFIG_DEBUG_FS)
drm_debugfs_cleanup(minor);
#endif

drm_sysfs_device_remove(minor);
idr_remove(&drm_minors_idr, minor->index);
}
Expand Down

0 comments on commit cb0f932

Please sign in to comment.