diff options
Diffstat (limited to 'drivers/gpu/nvgpu/vgpu')
-rw-r--r-- | drivers/gpu/nvgpu/vgpu/vgpu.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/vgpu/vgpu.c b/drivers/gpu/nvgpu/vgpu/vgpu.c index a9f102c8..b3bb4242 100644 --- a/drivers/gpu/nvgpu/vgpu/vgpu.c +++ b/drivers/gpu/nvgpu/vgpu/vgpu.c | |||
@@ -35,6 +35,9 @@ | |||
35 | #include "gk20a/channel_gk20a.h" | 35 | #include "gk20a/channel_gk20a.h" |
36 | #include "gm20b/hal_gm20b.h" | 36 | #include "gm20b/hal_gm20b.h" |
37 | 37 | ||
38 | #include "common/linux/module.h" | ||
39 | #include "common/linux/os_linux.h" | ||
40 | |||
38 | #include <nvgpu/hw/gk20a/hw_mc_gk20a.h> | 41 | #include <nvgpu/hw/gk20a/hw_mc_gk20a.h> |
39 | 42 | ||
40 | static inline int vgpu_comm_init(struct platform_device *pdev) | 43 | static inline int vgpu_comm_init(struct platform_device *pdev) |
@@ -628,6 +631,7 @@ static int vgpu_get_constants(struct gk20a *g) | |||
628 | 631 | ||
629 | int vgpu_probe(struct platform_device *pdev) | 632 | int vgpu_probe(struct platform_device *pdev) |
630 | { | 633 | { |
634 | struct nvgpu_os_linux *l; | ||
631 | struct gk20a *gk20a; | 635 | struct gk20a *gk20a; |
632 | int err; | 636 | int err; |
633 | struct device *dev = &pdev->dev; | 637 | struct device *dev = &pdev->dev; |
@@ -641,11 +645,12 @@ int vgpu_probe(struct platform_device *pdev) | |||
641 | 645 | ||
642 | gk20a_dbg_fn(""); | 646 | gk20a_dbg_fn(""); |
643 | 647 | ||
644 | gk20a = kzalloc(sizeof(struct gk20a), GFP_KERNEL); | 648 | l = kzalloc(sizeof(*l), GFP_KERNEL); |
645 | if (!gk20a) { | 649 | if (!l) { |
646 | dev_err(dev, "couldn't allocate gk20a support"); | 650 | dev_err(dev, "couldn't allocate gk20a support"); |
647 | return -ENOMEM; | 651 | return -ENOMEM; |
648 | } | 652 | } |
653 | gk20a = &l->g; | ||
649 | 654 | ||
650 | nvgpu_kmem_init(gk20a); | 655 | nvgpu_kmem_init(gk20a); |
651 | 656 | ||