From 1e7ba4c76d5a6a1b89f3af3bc418391596adc3f3 Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Thu, 2 Nov 2017 15:41:37 -0700 Subject: gpu: nvgpu: Use a callback to free struct gk20a struct gk20a is now part of nvgpu_os_linux in Linux builds. gk20a.c still frees struct gk20a by kfree(struct gk20a *), which is wrong. Create a new function pointer in struct gk20a for freeing the structure and call kfree(struct nvgpu_os_linux *) instead. JIRA NVGPU-259 Change-Id: I412ee993002cb2a42f0db015fc676de43418ec2f Signed-off-by: Terje Bergstrom Reviewed-on: https://git-master.nvidia.com/r/1591012 GVS: Gerrit_Virtual_Submit Reviewed-by: Deepak Nibade Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/vgpu/vgpu.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/gpu/nvgpu/vgpu/vgpu.c') diff --git a/drivers/gpu/nvgpu/vgpu/vgpu.c b/drivers/gpu/nvgpu/vgpu/vgpu.c index 93f9eaf4..2cd99e8c 100644 --- a/drivers/gpu/nvgpu/vgpu/vgpu.c +++ b/drivers/gpu/nvgpu/vgpu/vgpu.c @@ -47,6 +47,7 @@ #include "common/linux/os_linux.h" #include "common/linux/ioctl.h" #include "common/linux/scale.h" +#include "common/linux/driver_common.h" #ifdef CONFIG_TEGRA_19x_GPU #include @@ -657,6 +658,7 @@ int vgpu_probe(struct platform_device *pdev) return -ENOMEM; } gk20a = &l->g; + nvgpu_init_gk20a(gk20a); nvgpu_kmem_init(gk20a); -- cgit v1.2.2