summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_stub.c
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@gmail.com>2013-10-20 18:55:43 +0200
committerDave Airlie <airlied@redhat.com>2013-11-06 14:53:24 +1000
commit865fb47f7f9aa1a1be2ce6a1d37af98f8d4a0d04 (patch)
tree490895b8b12c900fbefe06b2aa3da8785b4ef26a /drivers/gpu/drm/drm_stub.c
parenta99ee459fd0ae38c0ccc7f93af718ef476657d1b (diff)
downloadlinux-0-day-865fb47f7f9aa1a1be2ce6a1d37af98f8d4a0d04.tar.gz
linux-0-day-865fb47f7f9aa1a1be2ce6a1d37af98f8d4a0d04.tar.xz
drm: cleanup debugfs in drm_unplug_minor()
There is no reason to delay debugfs-cleanup to drm_put_minor(). We should forbid any access to debugfs files once the device is dead. Chances they oops once a card was unplugged are very high, anyway. Signed-off-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/drm_stub.c')
-rw-r--r--drivers/gpu/drm/drm_stub.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/drm_stub.c b/drivers/gpu/drm/drm_stub.c
index 76b4d718af601..b37b0d99f262a 100644
--- a/drivers/gpu/drm/drm_stub.c
+++ b/drivers/gpu/drm/drm_stub.c
@@ -341,6 +341,10 @@ static void drm_unplug_minor(struct drm_minor *minor)
if (!minor || !device_is_registered(minor->kdev))
return;
+#if defined(CONFIG_DEBUG_FS)
+ drm_debugfs_cleanup(minor);
+#endif
+
drm_sysfs_device_remove(minor);
}
@@ -360,10 +364,6 @@ static void drm_put_minor(struct drm_minor *minor)
DRM_DEBUG("release secondary minor %d\n", minor->index);
-#if defined(CONFIG_DEBUG_FS)
- drm_debugfs_cleanup(minor);
-#endif
-
drm_unplug_minor(minor);
idr_remove(&drm_minors_idr, minor->index);