diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2017-11-02 18:41:37 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-11-06 13:06:40 -0500 |
commit | 1e7ba4c76d5a6a1b89f3af3bc418391596adc3f3 (patch) | |
tree | 49281effa663007dfb090233e088864d3520e975 /drivers/gpu/nvgpu/common/linux/module.c | |
parent | 9f5f029ae291ebbfef9f1e08b39875fa47c44982 (diff) |
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 <tbergstrom@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1591012
GVS: Gerrit_Virtual_Submit
Reviewed-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/module.c')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/module.c | 2 |
1 files changed, 2 insertions, 0 deletions
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 @@ | |||
53 | #include "cde_gm20b.h" | 53 | #include "cde_gm20b.h" |
54 | #include "cde_gp10b.h" | 54 | #include "cde_gp10b.h" |
55 | #include "ctxsw_trace.h" | 55 | #include "ctxsw_trace.h" |
56 | #include "driver_common.h" | ||
56 | 57 | ||
57 | #define CLASS_NAME "nvidia-gpu" | 58 | #define CLASS_NAME "nvidia-gpu" |
58 | /* TODO: Change to e.g. "nvidia-gpu%s" once we have symlinks in place. */ | 59 | /* 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) | |||
1027 | } | 1028 | } |
1028 | 1029 | ||
1029 | gk20a = &l->g; | 1030 | gk20a = &l->g; |
1031 | nvgpu_init_gk20a(gk20a); | ||
1030 | set_gk20a(dev, gk20a); | 1032 | set_gk20a(dev, gk20a); |
1031 | l->dev = &dev->dev; | 1033 | l->dev = &dev->dev; |
1032 | gk20a->log_mask = NVGPU_DEFAULT_DBG_MASK; | 1034 | gk20a->log_mask = NVGPU_DEFAULT_DBG_MASK; |