mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 18:16:01 +03:00
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>
This commit is contained in:
committed by
mobile promotions
parent
9f5f029ae2
commit
1e7ba4c76d
@@ -37,6 +37,7 @@
|
||||
#endif
|
||||
|
||||
#include "os_linux.h"
|
||||
#include "driver_common.h"
|
||||
|
||||
#define PCI_INTERFACE_NAME "card-%s%%s"
|
||||
|
||||
@@ -457,6 +458,7 @@ static int nvgpu_pci_probe(struct pci_dev *pdev,
|
||||
}
|
||||
|
||||
g = &l->g;
|
||||
nvgpu_init_gk20a(g);
|
||||
|
||||
nvgpu_kmem_init(g);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user