summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/linux/module.c
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2017-04-21 15:42:57 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-04-24 14:05:17 -0400
commitb3e1ce04b963e91b9b425b3c35cc4eff11db7543 (patch)
tree73c45d0acfe3ce25298ba1dc8dfa4777e02c861a /drivers/gpu/nvgpu/common/linux/module.c
parentb88c9ad793cb9822f359b8c498afe872c412959c (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/common/linux/module.c')
-rw-r--r--drivers/gpu/nvgpu/common/linux/module.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/module.c b/drivers/gpu/nvgpu/common/linux/module.c
index 79d6bd5f..ebc25a26 100644
--- a/drivers/gpu/nvgpu/common/linux/module.c
+++ b/drivers/gpu/nvgpu/common/linux/module.c
@@ -615,9 +615,9 @@ static int gk20a_pm_unrailgate(struct device *dev)
615{ 615{
616 struct gk20a_platform *platform = dev_get_drvdata(dev); 616 struct gk20a_platform *platform = dev_get_drvdata(dev);
617 int ret = 0; 617 int ret = 0;
618#ifdef CONFIG_DEBUG_FS
618 struct gk20a *g = get_gk20a(dev); 619 struct gk20a *g = get_gk20a(dev);
619 620
620#ifdef CONFIG_DEBUG_FS
621 g->pstats.last_rail_ungate_start = jiffies; 621 g->pstats.last_rail_ungate_start = jiffies;
622 if (g->pstats.railgating_cycle_count >= 1) 622 if (g->pstats.railgating_cycle_count >= 1)
623 g->pstats.total_rail_gate_time_ms = 623 g->pstats.total_rail_gate_time_ms =
@@ -974,8 +974,10 @@ static int __exit gk20a_remove(struct platform_device *pdev)
974 974
975 gk20a_user_deinit(dev, &nvgpu_class); 975 gk20a_user_deinit(dev, &nvgpu_class);
976 976
977#ifdef CONFIG_DEBUG_FS
977 debugfs_remove_recursive(platform->debugfs); 978 debugfs_remove_recursive(platform->debugfs);
978 debugfs_remove_recursive(platform->debugfs_alias); 979 debugfs_remove_recursive(platform->debugfs_alias);
980#endif
979 981
980 gk20a_remove_sysfs(dev); 982 gk20a_remove_sysfs(dev);
981 983