summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/linux/pci.c
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2017-11-02 18:41:37 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-11-06 13:06:40 -0500
commit1e7ba4c76d5a6a1b89f3af3bc418391596adc3f3 (patch)
tree49281effa663007dfb090233e088864d3520e975 /drivers/gpu/nvgpu/common/linux/pci.c
parent9f5f029ae291ebbfef9f1e08b39875fa47c44982 (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/pci.c')
-rw-r--r--drivers/gpu/nvgpu/common/linux/pci.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/pci.c b/drivers/gpu/nvgpu/common/linux/pci.c
index 118567e5..296d0a7c 100644
--- a/drivers/gpu/nvgpu/common/linux/pci.c
+++ b/drivers/gpu/nvgpu/common/linux/pci.c
@@ -37,6 +37,7 @@
37#endif 37#endif
38 38
39#include "os_linux.h" 39#include "os_linux.h"
40#include "driver_common.h"
40 41
41#define PCI_INTERFACE_NAME "card-%s%%s" 42#define PCI_INTERFACE_NAME "card-%s%%s"
42 43
@@ -457,6 +458,7 @@ static int nvgpu_pci_probe(struct pci_dev *pdev,
457 } 458 }
458 459
459 g = &l->g; 460 g = &l->g;
461 nvgpu_init_gk20a(g);
460 462
461 nvgpu_kmem_init(g); 463 nvgpu_kmem_init(g);
462 464