Commit 30a17101 authored by Noralf Trønnes's avatar Noralf Trønnes Committed by Daniel Vetter

drm/amd/amdgpu: Remove drm_debugfs_remove_files() call

drm_debugfs_cleanup() now removes all minor->debugfs_list entries
automatically, so no need to call drm_debugfs_remove_files().
Also remove empty drm_driver.debugfs_cleanup callback.

Cc: alexander.deucher@amd.com
Cc: christian.koenig@amd.com
Signed-off-by: default avatarNoralf Trønnes <noralf@tronnes.org>
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20170126225621.12314-5-noralf@tronnes.org
parent fa4c1de4
...@@ -1133,7 +1133,6 @@ int amdgpu_debugfs_fence_init(struct amdgpu_device *adev); ...@@ -1133,7 +1133,6 @@ int amdgpu_debugfs_fence_init(struct amdgpu_device *adev);
#if defined(CONFIG_DEBUG_FS) #if defined(CONFIG_DEBUG_FS)
int amdgpu_debugfs_init(struct drm_minor *minor); int amdgpu_debugfs_init(struct drm_minor *minor);
void amdgpu_debugfs_cleanup(struct drm_minor *minor);
#endif #endif
int amdgpu_debugfs_firmware_init(struct amdgpu_device *adev); int amdgpu_debugfs_firmware_init(struct amdgpu_device *adev);
......
...@@ -1850,8 +1850,6 @@ int amdgpu_device_init(struct amdgpu_device *adev, ...@@ -1850,8 +1850,6 @@ int amdgpu_device_init(struct amdgpu_device *adev,
return r; return r;
} }
static void amdgpu_debugfs_remove_files(struct amdgpu_device *adev);
/** /**
* amdgpu_device_fini - tear down the driver * amdgpu_device_fini - tear down the driver
* *
...@@ -1891,7 +1889,6 @@ void amdgpu_device_fini(struct amdgpu_device *adev) ...@@ -1891,7 +1889,6 @@ void amdgpu_device_fini(struct amdgpu_device *adev)
if (adev->asic_type >= CHIP_BONAIRE) if (adev->asic_type >= CHIP_BONAIRE)
amdgpu_doorbell_fini(adev); amdgpu_doorbell_fini(adev);
amdgpu_debugfs_regs_cleanup(adev); amdgpu_debugfs_regs_cleanup(adev);
amdgpu_debugfs_remove_files(adev);
} }
...@@ -2505,19 +2502,6 @@ int amdgpu_debugfs_add_files(struct amdgpu_device *adev, ...@@ -2505,19 +2502,6 @@ int amdgpu_debugfs_add_files(struct amdgpu_device *adev,
return 0; return 0;
} }
static void amdgpu_debugfs_remove_files(struct amdgpu_device *adev)
{
#if defined(CONFIG_DEBUG_FS)
unsigned i;
for (i = 0; i < adev->debugfs_count; i++) {
drm_debugfs_remove_files(adev->debugfs[i].files,
adev->debugfs[i].num_files,
adev->ddev->primary);
}
#endif
}
#if defined(CONFIG_DEBUG_FS) #if defined(CONFIG_DEBUG_FS)
static ssize_t amdgpu_debugfs_regs_read(struct file *f, char __user *buf, static ssize_t amdgpu_debugfs_regs_read(struct file *f, char __user *buf,
...@@ -3151,10 +3135,6 @@ int amdgpu_debugfs_init(struct drm_minor *minor) ...@@ -3151,10 +3135,6 @@ int amdgpu_debugfs_init(struct drm_minor *minor)
{ {
return 0; return 0;
} }
void amdgpu_debugfs_cleanup(struct drm_minor *minor)
{
}
#else #else
static int amdgpu_debugfs_regs_init(struct amdgpu_device *adev) static int amdgpu_debugfs_regs_init(struct amdgpu_device *adev)
{ {
......
...@@ -693,7 +693,6 @@ static struct drm_driver kms_driver = { ...@@ -693,7 +693,6 @@ static struct drm_driver kms_driver = {
.get_scanout_position = amdgpu_get_crtc_scanoutpos, .get_scanout_position = amdgpu_get_crtc_scanoutpos,
#if defined(CONFIG_DEBUG_FS) #if defined(CONFIG_DEBUG_FS)
.debugfs_init = amdgpu_debugfs_init, .debugfs_init = amdgpu_debugfs_init,
.debugfs_cleanup = amdgpu_debugfs_cleanup,
#endif #endif
.irq_preinstall = amdgpu_irq_preinstall, .irq_preinstall = amdgpu_irq_preinstall,
.irq_postinstall = amdgpu_irq_postinstall, .irq_postinstall = amdgpu_irq_postinstall,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment