diff options
| author | David Herrmann <dh.herrmann@gmail.com> | 2013-10-20 12:55:43 -0400 |
|---|---|---|
| committer | Dave Airlie <airlied@redhat.com> | 2013-11-05 23:53:24 -0500 |
| commit | 865fb47f7f9aa1a1be2ce6a1d37af98f8d4a0d04 (patch) | |
| tree | 490895b8b12c900fbefe06b2aa3da8785b4ef26a | |
| parent | a99ee459fd0ae38c0ccc7f93af718ef476657d1b (diff) | |
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>
| -rw-r--r-- | drivers/gpu/drm/drm_stub.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/drm_stub.c b/drivers/gpu/drm/drm_stub.c index 76b4d718af60..b37b0d99f262 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) | |||
| 341 | if (!minor || !device_is_registered(minor->kdev)) | 341 | if (!minor || !device_is_registered(minor->kdev)) |
| 342 | return; | 342 | return; |
| 343 | 343 | ||
| 344 | #if defined(CONFIG_DEBUG_FS) | ||
| 345 | drm_debugfs_cleanup(minor); | ||
| 346 | #endif | ||
| 347 | |||
| 344 | drm_sysfs_device_remove(minor); | 348 | drm_sysfs_device_remove(minor); |
| 345 | } | 349 | } |
| 346 | 350 | ||
| @@ -360,10 +364,6 @@ static void drm_put_minor(struct drm_minor *minor) | |||
| 360 | 364 | ||
| 361 | DRM_DEBUG("release secondary minor %d\n", minor->index); | 365 | DRM_DEBUG("release secondary minor %d\n", minor->index); |
| 362 | 366 | ||
| 363 | #if defined(CONFIG_DEBUG_FS) | ||
| 364 | drm_debugfs_cleanup(minor); | ||
| 365 | #endif | ||
| 366 | |||
| 367 | drm_unplug_minor(minor); | 367 | drm_unplug_minor(minor); |
| 368 | 368 | ||
| 369 | idr_remove(&drm_minors_idr, minor->index); | 369 | idr_remove(&drm_minors_idr, minor->index); |
