From 2ecd18902e29b8a3615f49afe3c51b2526816be7 Mon Sep 17 00:00:00 2001 From: Alex Waterman Date: Tue, 10 Oct 2017 11:28:03 -0700 Subject: gpu: nvgpu: Use config in makefile for debug_kmem.c Conditionally compile debug_kmem.c in the Makefile since the entire file is not needed when CONFIG_NVGPU_TRACK_KMEM_USAGE is not enabled. Removing as many conditional compilation flags from the C code itself is highly desirable from a code complexity standard. Change-Id: If1e87986ca1ee6d71485f1ab40f10c1645c1a628 Signed-off-by: Alex Waterman Reviewed-on: https://git-master.nvidia.com/r/1576543 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/Makefile.nvgpu | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'drivers/gpu/nvgpu/Makefile.nvgpu') diff --git a/drivers/gpu/nvgpu/Makefile.nvgpu b/drivers/gpu/nvgpu/Makefile.nvgpu index 9ba6f49a..e059002a 100644 --- a/drivers/gpu/nvgpu/Makefile.nvgpu +++ b/drivers/gpu/nvgpu/Makefile.nvgpu @@ -137,10 +137,14 @@ nvgpu-$(CONFIG_DEBUG_FS) += \ common/linux/debug_mm.o \ common/linux/debug_allocator.o \ common/linux/debug_hal.o \ - common/linux/debug_kmem.o \ common/linux/debug_clk.o \ common/linux/debug_xve.o +ifeq ($(CONFIG_NVGPU_TRACK_MEM_USAGE),y) +nvgpu-$(CONFIG_DEBUG_FS) += \ + common/linux/debug_kmem.o +endif + nvgpu-$(CONFIG_TEGRA_GK20A) += common/linux/platform_gk20a_tegra.o nvgpu-$(CONFIG_SYNC) += gk20a/sync_gk20a.o nvgpu-$(CONFIG_GK20A_PCI) += common/linux/pci.o -- cgit v1.2.2