From 794d1edbe48d20bceb3835a162a70cf23e71603e Mon Sep 17 00:00:00 2001 From: Sahil Mukund Patki Date: Wed, 8 Sep 2021 12:18:33 +0000 Subject: [PATCH] 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 Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2591304 Tested-by: mobile promotions Reviewed-by: mobile promotions --- drivers/gpu/nvgpu/os/linux/module.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/nvgpu/os/linux/module.c b/drivers/gpu/nvgpu/os/linux/module.c index e660c5156..1cc01f85e 100644 --- a/drivers/gpu/nvgpu/os/linux/module.c +++ b/drivers/gpu/nvgpu/os/linux/module.c @@ -312,7 +312,7 @@ int nvgpu_finalize_poweron_linux(struct nvgpu_os_linux *l) return err; } -#ifdef CONFIG_NVGPU_DGPU +#if defined(CONFIG_NVGPU_DGPU) && defined(CONFIG_DEBUG_FS) if (!g->is_virtual) nvgpu_ce_debugfs_init(g); #endif