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/common/linux/module.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/gpu/nvgpu/common/linux/module.c') diff --git a/drivers/gpu/nvgpu/common/linux/module.c b/drivers/gpu/nvgpu/common/linux/module.c index 4aff6a2d..4841b032 100644 --- a/drivers/gpu/nvgpu/common/linux/module.c +++ b/drivers/gpu/nvgpu/common/linux/module.c @@ -53,6 +53,7 @@ #include "cde_gm20b.h" #include "cde_gp10b.h" #include "ctxsw_trace.h" +#include "driver_common.h" #define CLASS_NAME "nvidia-gpu" /* TODO: Change to e.g. "nvidia-gpu%s" once we have symlinks in place. */ @@ -1027,6 +1028,7 @@ static int gk20a_probe(struct platform_device *dev) } gk20a = &l->g; + nvgpu_init_gk20a(gk20a); set_gk20a(dev, gk20a); l->dev = &dev->dev; gk20a->log_mask = NVGPU_DEFAULT_DBG_MASK; -- cgit v1.2.2