diff options
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/pci.c')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/pci.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/pci.c b/drivers/gpu/nvgpu/common/linux/pci.c index 767e9d47..0a5095fe 100644 --- a/drivers/gpu/nvgpu/common/linux/pci.c +++ b/drivers/gpu/nvgpu/common/linux/pci.c | |||
@@ -20,6 +20,7 @@ | |||
20 | 20 | ||
21 | #include <nvgpu/nvgpu_common.h> | 21 | #include <nvgpu/nvgpu_common.h> |
22 | #include <nvgpu/kmem.h> | 22 | #include <nvgpu/kmem.h> |
23 | #include <nvgpu/enabled.h> | ||
23 | 24 | ||
24 | #include "gk20a/gk20a.h" | 25 | #include "gk20a/gk20a.h" |
25 | #include "gk20a/platform_gk20a.h" | 26 | #include "gk20a/platform_gk20a.h" |
@@ -358,11 +359,17 @@ static int nvgpu_pci_probe(struct pci_dev *pdev, | |||
358 | return -ENOMEM; | 359 | return -ENOMEM; |
359 | } | 360 | } |
360 | 361 | ||
362 | nvgpu_kmem_init(g); | ||
363 | |||
364 | err = nvgpu_init_enabled_flags(g); | ||
365 | if (err) { | ||
366 | kfree(g); | ||
367 | return err; | ||
368 | } | ||
369 | |||
361 | platform->g = g; | 370 | platform->g = g; |
362 | g->dev = &pdev->dev; | 371 | g->dev = &pdev->dev; |
363 | 372 | ||
364 | nvgpu_kmem_init(g); | ||
365 | |||
366 | err = pci_enable_device(pdev); | 373 | err = pci_enable_device(pdev); |
367 | if (err) | 374 | if (err) |
368 | return err; | 375 | return err; |