diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2017-04-21 15:42:57 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-04-24 14:05:17 -0400 |
commit | b3e1ce04b963e91b9b425b3c35cc4eff11db7543 (patch) | |
tree | 73c45d0acfe3ce25298ba1dc8dfa4777e02c861a /drivers/gpu/nvgpu/gp106 | |
parent | b88c9ad793cb9822f359b8c498afe872c412959c (diff) |
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 <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/1467897
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Diffstat (limited to 'drivers/gpu/nvgpu/gp106')
-rw-r--r-- | drivers/gpu/nvgpu/gp106/acr_gp106.c | 2 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gp106/clk_gp106.c | 3 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gp106/therm_gp106.c | 2 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gp106/xve_gp106.c | 4 |
4 files changed, 10 insertions, 1 deletions
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 @@ | |||
11 | * more details. | 11 | * more details. |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #ifdef CONFIG_DEBUG_FS | ||
14 | #include <linux/debugfs.h> | 15 | #include <linux/debugfs.h> |
16 | #endif | ||
15 | 17 | ||
16 | #include <nvgpu/nvgpu_common.h> | 18 | #include <nvgpu/nvgpu_common.h> |
17 | #include <nvgpu/kmem.h> | 19 | #include <nvgpu/kmem.h> |
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 @@ | |||
16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | */ | 17 | */ |
18 | 18 | ||
19 | #ifdef CONFIG_DEBUG_FS | ||
19 | #include <linux/debugfs.h> | 20 | #include <linux/debugfs.h> |
20 | #include <linux/uaccess.h> | 21 | #endif |
21 | 22 | ||
22 | #include <nvgpu/kmem.h> | 23 | #include <nvgpu/kmem.h> |
23 | 24 | ||
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 @@ | |||
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include "therm_gp106.h" | 14 | #include "therm_gp106.h" |
15 | #ifdef CONFIG_DEBUG_FS | ||
15 | #include <linux/debugfs.h> | 16 | #include <linux/debugfs.h> |
17 | #endif | ||
16 | #include "therm/thrmpmu.h" | 18 | #include "therm/thrmpmu.h" |
17 | 19 | ||
18 | #include <nvgpu/hw/gp106/hw_therm_gp106.h> | 20 | #include <nvgpu/hw/gp106/hw_therm_gp106.h> |
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 @@ | |||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #ifdef CONFIG_DEBUG_FS | ||
17 | #include <linux/debugfs.h> | 18 | #include <linux/debugfs.h> |
18 | #include <linux/uaccess.h> | 19 | #include <linux/uaccess.h> |
20 | #endif | ||
19 | 21 | ||
20 | #include "gk20a/gk20a.h" | 22 | #include "gk20a/gk20a.h" |
21 | #include "gm206/bios_gm206.h" | 23 | #include "gm206/bios_gm206.h" |
@@ -498,6 +500,7 @@ static void xve_available_speeds_gp106(struct gk20a *g, u32 *speed_mask) | |||
498 | *speed_mask = GPU_XVE_SPEED_2P5 | GPU_XVE_SPEED_5P0; | 500 | *speed_mask = GPU_XVE_SPEED_2P5 | GPU_XVE_SPEED_5P0; |
499 | } | 501 | } |
500 | 502 | ||
503 | #ifdef CONFIG_DEBUG_FS | ||
501 | static ssize_t xve_link_speed_write(struct file *filp, | 504 | static ssize_t xve_link_speed_write(struct file *filp, |
502 | const char __user *buff, | 505 | const char __user *buff, |
503 | size_t len, loff_t *off) | 506 | size_t len, loff_t *off) |
@@ -621,6 +624,7 @@ static const struct file_operations xve_link_control_status_fops = { | |||
621 | .llseek = seq_lseek, | 624 | .llseek = seq_lseek, |
622 | .release = single_release, | 625 | .release = single_release, |
623 | }; | 626 | }; |
627 | #endif | ||
624 | 628 | ||
625 | static int xve_sw_init_gp106(struct device *dev) | 629 | static int xve_sw_init_gp106(struct device *dev) |
626 | { | 630 | { |