gpu: nvgpu: Fix debugfs compilation errors

The function "nvgpu_ce_debugfs_init" is declared in "debug_ce.h".
This file is only compiled when CONFIG_DEBUG_FS is enabled. So
any accesses to this function result in compilation errors when
CONFIG_DEBUG_FS is disabled.

This patch fixes the errors by guarding all accesses to the above
mentioned function by CONFIG_DEBUG_FS.

Bug 200755555

Change-Id: Ie566413913c4a72b10b87c3285d1263d1c811074
Signed-off-by: Sahil Mukund Patki <spatki@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2591304
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Sahil Mukund Patki
2021-09-08 12:18:33 +00:00
committed by mobile promotions
parent dd94573e55
commit 794d1edbe4

View File

@@ -312,7 +312,7 @@ int nvgpu_finalize_poweron_linux(struct nvgpu_os_linux *l)
return err; return err;
} }
#ifdef CONFIG_NVGPU_DGPU #if defined(CONFIG_NVGPU_DGPU) && defined(CONFIG_DEBUG_FS)
if (!g->is_virtual) if (!g->is_virtual)
nvgpu_ce_debugfs_init(g); nvgpu_ce_debugfs_init(g);
#endif #endif