diff options
author | Alex Waterman <alexw@nvidia.com> | 2017-05-19 12:17:29 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-05-24 07:56:13 -0400 |
commit | 9db45cf0376c6de8d71cc8087d0ec76dff72c00b (patch) | |
tree | 0e105f126458b52ca2522bcf96186b6c0887c5d4 /drivers/gpu/nvgpu/include | |
parent | 05388ad24a61c43a110e3d235622c23a356b5df7 (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/include')
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/allocator.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/include/nvgpu/allocator.h b/drivers/gpu/nvgpu/include/nvgpu/allocator.h index 4eb76985..3579b0fb 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/allocator.h +++ b/drivers/gpu/nvgpu/include/nvgpu/allocator.h | |||
@@ -281,7 +281,10 @@ static inline void nvgpu_alloc_disable_dbg(struct nvgpu_allocator *a) | |||
281 | */ | 281 | */ |
282 | extern u32 nvgpu_alloc_tracing_on; | 282 | extern u32 nvgpu_alloc_tracing_on; |
283 | 283 | ||
284 | #ifdef CONFIG_DEBUG_FS | ||
285 | struct device; | ||
284 | void nvgpu_alloc_debugfs_init(struct device *dev); | 286 | void nvgpu_alloc_debugfs_init(struct device *dev); |
287 | #endif | ||
285 | 288 | ||
286 | #define nvgpu_alloc_trace_func() \ | 289 | #define nvgpu_alloc_trace_func() \ |
287 | do { \ | 290 | do { \ |