From c11228d48be1825e1ec84afd38c6938504fa4100 Mon Sep 17 00:00:00 2001 From: Alex Waterman Date: Wed, 8 Mar 2017 16:51:33 -0800 Subject: gpu: nvgpu: Use new kmem API functions (common/*) Use the new kmem API functions in common/* and common/mm/*. Add a struct gk20a pointer to struct nvgpu_allocator in order to store the gk20a pointer used for allocating memory. Bug 1799159 Bug 1823380 Change-Id: I881ea9545e8a8f0b75d77a1e35dd1812e0bb654e Signed-off-by: Alex Waterman Reviewed-on: http://git-master/r/1318315 Reviewed-by: svccoveritychecker GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom --- drivers/gpu/nvgpu/common/mm/nvgpu_allocator.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/gpu/nvgpu/common/mm/nvgpu_allocator.c') diff --git a/drivers/gpu/nvgpu/common/mm/nvgpu_allocator.c b/drivers/gpu/nvgpu/common/mm/nvgpu_allocator.c index 24a76a0b..02b7b48d 100644 --- a/drivers/gpu/nvgpu/common/mm/nvgpu_allocator.c +++ b/drivers/gpu/nvgpu/common/mm/nvgpu_allocator.c @@ -123,7 +123,7 @@ void nvgpu_alloc_destroy(struct nvgpu_allocator *a) /* * Handle the common init stuff for a nvgpu_allocator. */ -int __nvgpu_alloc_common_init(struct nvgpu_allocator *a, +int __nvgpu_alloc_common_init(struct nvgpu_allocator *a, struct gk20a *g, const char *name, void *priv, bool dbg, const struct nvgpu_allocator_ops *ops) { @@ -143,6 +143,7 @@ int __nvgpu_alloc_common_init(struct nvgpu_allocator *a, if (err) return err; + a->g = g; a->ops = ops; a->priv = priv; a->debug = dbg; -- cgit v1.2.2