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
This commit is contained in:
Terje Bergstrom
2017-04-21 12:42:57 -07:00
committed by mobile promotions
parent b88c9ad793
commit b3e1ce04b9
33 changed files with 89 additions and 22 deletions

View File

@@ -12,9 +12,12 @@
*
*/
#ifdef CONFIG_DEBUG_FS
#include <linux/debugfs.h>
#endif
#include <linux/seq_file.h>
#include <linux/io.h>
#include <linux/fs.h>
#include <nvgpu/log.h>
#include <nvgpu/kmem.h>
@@ -298,8 +301,8 @@ int gk20a_railgating_debugfs_init(struct device *dev)
void gk20a_debug_init(struct device *dev, const char *debugfs_symlink)
{
struct gk20a_platform *platform = dev_get_drvdata(dev);
#ifdef CONFIG_DEBUG_FS
struct gk20a_platform *platform = dev_get_drvdata(dev);
struct gk20a *g = platform->g;
platform->debugfs = debugfs_create_dir(dev_name(dev), NULL);