]> git.karo-electronics.de Git - linux-beck.git/commitdiff
gpu/drm/amdgpu: Fix build when CONFIG_DEBUG_FS is not set
authorAlexander Kuleshov <kuleshovmail@gmail.com>
Sat, 27 Jun 2015 07:16:05 +0000 (13:16 +0600)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 29 Jun 2015 19:52:48 +0000 (15:52 -0400)
If the CONFIG_DEBUG_FS is not selected, compilation of the
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c provides two warnings that
amdgpu_debugfs_regs_init and amdgpu_debugfs_regs_cleanup are used but
never defined. And as result:

ERROR: "amdgpu_debugfs_regs_cleanup" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined!
ERROR: "amdgpu_debugfs_regs_init" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined!
            ^
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

index e19097554093b910c47981b6cbf3394f33bc1532..ba46be361c9b2c9f40bf0acb751e65b156d4b171 100644 (file)
@@ -2001,4 +2001,10 @@ int amdgpu_debugfs_init(struct drm_minor *minor)
 void amdgpu_debugfs_cleanup(struct drm_minor *minor)
 {
 }
+#else
+static int amdgpu_debugfs_regs_init(struct amdgpu_device *adev)
+{
+       return 0;
+}
+static void amdgpu_debugfs_regs_cleanup(struct amdgpu_device *adev) { }
 #endif