drm/amd/amdgpu: Remove drm_debugfs_remove_files() call
authorNoralf Trønnes <noralf@tronnes.org>
Thu, 26 Jan 2017 22:56:06 +0000 (23:56 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 27 Jan 2017 14:23:16 +0000 (15:23 +0100)
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: Noralf Trønnes <noralf@tronnes.org>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20170126225621.12314-5-noralf@tronnes.org
drivers/gpu/drm/amd/amdgpu/amdgpu.h
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c

index f4f371f..73863d4 100644 (file)
@@ -1133,7 +1133,6 @@ int amdgpu_debugfs_fence_init(struct amdgpu_device *adev);
 
 #if defined(CONFIG_DEBUG_FS)
 int amdgpu_debugfs_init(struct drm_minor *minor);
-void amdgpu_debugfs_cleanup(struct drm_minor *minor);
 #endif
 
 int amdgpu_debugfs_firmware_init(struct amdgpu_device *adev);
index 60bd4af..31ca817 100644 (file)
@@ -1850,8 +1850,6 @@ failed:
        return r;
 }
 
-static void amdgpu_debugfs_remove_files(struct amdgpu_device *adev);
-
 /**
  * amdgpu_device_fini - tear down the driver
  *
@@ -1891,7 +1889,6 @@ void amdgpu_device_fini(struct amdgpu_device *adev)
        if (adev->asic_type >= CHIP_BONAIRE)
                amdgpu_doorbell_fini(adev);
        amdgpu_debugfs_regs_cleanup(adev);
-       amdgpu_debugfs_remove_files(adev);
 }
 
 
@@ -2505,19 +2502,6 @@ int amdgpu_debugfs_add_files(struct amdgpu_device *adev,
        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)
 
 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)
 {
        return 0;
 }
-
-void amdgpu_debugfs_cleanup(struct drm_minor *minor)
-{
-}
 #else
 static int amdgpu_debugfs_regs_init(struct amdgpu_device *adev)
 {
index 567bc93..ec47838 100644 (file)
@@ -693,7 +693,6 @@ static struct drm_driver kms_driver = {
        .get_scanout_position = amdgpu_get_crtc_scanoutpos,
 #if defined(CONFIG_DEBUG_FS)
        .debugfs_init = amdgpu_debugfs_init,
-       .debugfs_cleanup = amdgpu_debugfs_cleanup,
 #endif
        .irq_preinstall = amdgpu_irq_preinstall,
        .irq_postinstall = amdgpu_irq_postinstall,