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/gp106/acr_gp106.c | 2 ++ drivers/gpu/nvgpu/gp106/clk_gp106.c | 3 ++- drivers/gpu/nvgpu/gp106/therm_gp106.c | 2 ++ drivers/gpu/nvgpu/gp106/xve_gp106.c | 4 ++++ 4 files changed, 10 insertions(+), 1 deletion(-) (limited to 'drivers/gpu/nvgpu/gp106') diff --git a/drivers/gpu/nvgpu/gp106/acr_gp106.c b/drivers/gpu/nvgpu/gp106/acr_gp106.c index c4045cb6..5570489e 100644 --- a/drivers/gpu/nvgpu/gp106/acr_gp106.c +++ b/drivers/gpu/nvgpu/gp106/acr_gp106.c @@ -11,7 +11,9 @@ * more details. */ +#ifdef CONFIG_DEBUG_FS #include +#endif #include #include diff --git a/drivers/gpu/nvgpu/gp106/clk_gp106.c b/drivers/gpu/nvgpu/gp106/clk_gp106.c index fb9406e5..e4348e73 100644 --- a/drivers/gpu/nvgpu/gp106/clk_gp106.c +++ b/drivers/gpu/nvgpu/gp106/clk_gp106.c @@ -16,8 +16,9 @@ * along with this program. If not, see . */ +#ifdef CONFIG_DEBUG_FS #include -#include +#endif #include diff --git a/drivers/gpu/nvgpu/gp106/therm_gp106.c b/drivers/gpu/nvgpu/gp106/therm_gp106.c index 761d1b89..4f616d8e 100644 --- a/drivers/gpu/nvgpu/gp106/therm_gp106.c +++ b/drivers/gpu/nvgpu/gp106/therm_gp106.c @@ -12,7 +12,9 @@ */ #include "therm_gp106.h" +#ifdef CONFIG_DEBUG_FS #include +#endif #include "therm/thrmpmu.h" #include diff --git a/drivers/gpu/nvgpu/gp106/xve_gp106.c b/drivers/gpu/nvgpu/gp106/xve_gp106.c index a5834174..4d00b20b 100644 --- a/drivers/gpu/nvgpu/gp106/xve_gp106.c +++ b/drivers/gpu/nvgpu/gp106/xve_gp106.c @@ -14,8 +14,10 @@ * along with this program. If not, see . */ +#ifdef CONFIG_DEBUG_FS #include #include +#endif #include "gk20a/gk20a.h" #include "gm206/bios_gm206.h" @@ -498,6 +500,7 @@ static void xve_available_speeds_gp106(struct gk20a *g, u32 *speed_mask) *speed_mask = GPU_XVE_SPEED_2P5 | GPU_XVE_SPEED_5P0; } +#ifdef CONFIG_DEBUG_FS static ssize_t xve_link_speed_write(struct file *filp, const char __user *buff, size_t len, loff_t *off) @@ -621,6 +624,7 @@ static const struct file_operations xve_link_control_status_fops = { .llseek = seq_lseek, .release = single_release, }; +#endif static int xve_sw_init_gp106(struct device *dev) { -- cgit v1.2.2