summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common
diff options
context:
space:
mode:
authorAlex Waterman <alexw@nvidia.com>2017-05-19 12:17:29 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-05-24 07:56:13 -0400
commit9db45cf0376c6de8d71cc8087d0ec76dff72c00b (patch)
tree0e105f126458b52ca2522bcf96186b6c0887c5d4 /drivers/gpu/nvgpu/common
parent05388ad24a61c43a110e3d235622c23a356b5df7 (diff)
gpu: nvgpu: Fix build failure in allocator.h
Fix a build failure caused by missing definition for struct device. Instead of including device.h wrap the debugfs init function with CONFIG_DEBUG_FS and forward declare struct device. We don't use any struct device internals here so we only need to let the compiler know that this type does exist. Bug 200310575 Change-Id: I1ae45a8f191d920d9b606fefd5029fad84869cff Signed-off-by: Alex Waterman <alexw@nvidia.com> Reviewed-on: http://git-master/r/1486012 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/common')
-rw-r--r--drivers/gpu/nvgpu/common/mm/nvgpu_allocator.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/common/mm/nvgpu_allocator.c b/drivers/gpu/nvgpu/common/mm/nvgpu_allocator.c
index a3c4e3b6..211b353b 100644
--- a/drivers/gpu/nvgpu/common/mm/nvgpu_allocator.c
+++ b/drivers/gpu/nvgpu/common/mm/nvgpu_allocator.c
@@ -201,9 +201,9 @@ void nvgpu_fini_alloc_debug(struct nvgpu_allocator *a)
201#endif 201#endif
202} 202}
203 203
204#ifdef CONFIG_DEBUG_FS
204void nvgpu_alloc_debugfs_init(struct device *dev) 205void nvgpu_alloc_debugfs_init(struct device *dev)
205{ 206{
206#ifdef CONFIG_DEBUG_FS
207 struct gk20a_platform *platform = dev_get_drvdata(dev); 207 struct gk20a_platform *platform = dev_get_drvdata(dev);
208 struct dentry *gpu_root = platform->debugfs; 208 struct dentry *gpu_root = platform->debugfs;
209 struct gk20a *g = get_gk20a(dev); 209 struct gk20a *g = get_gk20a(dev);
@@ -214,5 +214,5 @@ void nvgpu_alloc_debugfs_init(struct device *dev)
214 214
215 debugfs_create_u32("tracing", 0664, g->debugfs_allocators, 215 debugfs_create_u32("tracing", 0664, g->debugfs_allocators,
216 &nvgpu_alloc_tracing_on); 216 &nvgpu_alloc_tracing_on);
217#endif
218} 217}
218#endif