mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 02:22:34 +03:00
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>
This commit is contained in:
committed by
mobile promotions
parent
05388ad24a
commit
9db45cf037
@@ -201,9 +201,9 @@ void nvgpu_fini_alloc_debug(struct nvgpu_allocator *a)
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
void nvgpu_alloc_debugfs_init(struct device *dev)
|
||||
{
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
struct gk20a_platform *platform = dev_get_drvdata(dev);
|
||||
struct dentry *gpu_root = platform->debugfs;
|
||||
struct gk20a *g = get_gk20a(dev);
|
||||
@@ -214,5 +214,5 @@ void nvgpu_alloc_debugfs_init(struct device *dev)
|
||||
|
||||
debugfs_create_u32("tracing", 0664, g->debugfs_allocators,
|
||||
&nvgpu_alloc_tracing_on);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -281,7 +281,10 @@ static inline void nvgpu_alloc_disable_dbg(struct nvgpu_allocator *a)
|
||||
*/
|
||||
extern u32 nvgpu_alloc_tracing_on;
|
||||
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
struct device;
|
||||
void nvgpu_alloc_debugfs_init(struct device *dev);
|
||||
#endif
|
||||
|
||||
#define nvgpu_alloc_trace_func() \
|
||||
do { \
|
||||
|
||||
Reference in New Issue
Block a user