diff options
Diffstat (limited to 'drivers/gpu/nvgpu')
-rw-r--r-- | drivers/gpu/nvgpu/common/mm/nvgpu_allocator.c | 4 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/allocator.h | 3 |
2 files changed, 5 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 | ||
204 | void nvgpu_alloc_debugfs_init(struct device *dev) | 205 | void 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 | ||
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 { \ |