From b3e1ce04b963e91b9b425b3c35cc4eff11db7543 Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Fri, 21 Apr 2017 12:42:57 -0700 Subject: gpu: nvgpu: Put debugfs dependencies inside #ifdef Put all debugfs dependencies inside #ifdef CONFIG_DEBUG_FS. This includes some functions in allocators that were used only for debugging. Remove include of linux/debugfs.h on files that do not deal with debugfs. linux/debugfs.h implicitly included linux/fs.h, which we relied on. Add explicit include of linux/fs.h for all files where this is the case. Change-Id: I16feffae6b0e3a2edf366075cdc01ade86be06f9 Signed-off-by: Terje Bergstrom Reviewed-on: http://git-master/r/1467897 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit --- drivers/gpu/nvgpu/include/nvgpu/allocator.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'drivers/gpu/nvgpu/include') diff --git a/drivers/gpu/nvgpu/include/nvgpu/allocator.h b/drivers/gpu/nvgpu/include/nvgpu/allocator.h index 61914d8c..b605b059 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/allocator.h +++ b/drivers/gpu/nvgpu/include/nvgpu/allocator.h @@ -17,7 +17,6 @@ #ifndef NVGPU_ALLOCATOR_H #define NVGPU_ALLOCATOR_H -#include #include #include @@ -74,9 +73,11 @@ struct nvgpu_allocator_ops { /* Destructor. */ void (*fini)(struct nvgpu_allocator *allocator); +#ifdef CONFIG_DEBUG_FS /* Debugging. */ void (*print_stats)(struct nvgpu_allocator *allocator, struct seq_file *s, int lock); +#endif }; struct nvgpu_allocator { @@ -246,8 +247,10 @@ u64 nvgpu_alloc_space(struct nvgpu_allocator *a); void nvgpu_alloc_destroy(struct nvgpu_allocator *allocator); +#ifdef CONFIG_DEBUG_FS void nvgpu_alloc_print_stats(struct nvgpu_allocator *a, struct seq_file *s, int lock); +#endif static inline struct gk20a *nvgpu_alloc_to_gpu(struct nvgpu_allocator *a) { -- cgit v1.2.2