From 92c43deefca150854193c6720717d56b61989c23 Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Tue, 20 Jun 2017 12:18:47 -0700 Subject: gpu: nvgpu: Remove Linux devnode fields from gk20a Move Linux devnode related fields to a new header file os_linux.h. The class structure is defined in module.c, so move its declaration to module.h. JIRA NVGPU-38 Change-Id: I5d8920169064f4289ff61004f7f81543a9aba221 Signed-off-by: Terje Bergstrom Reviewed-on: http://git-master/r/1505927 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/vgpu/vgpu.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'drivers/gpu/nvgpu/vgpu') 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 @@ #include "gk20a/channel_gk20a.h" #include "gm20b/hal_gm20b.h" +#include "common/linux/module.h" +#include "common/linux/os_linux.h" + #include static inline int vgpu_comm_init(struct platform_device *pdev) @@ -628,6 +631,7 @@ static int vgpu_get_constants(struct gk20a *g) int vgpu_probe(struct platform_device *pdev) { + struct nvgpu_os_linux *l; struct gk20a *gk20a; int err; struct device *dev = &pdev->dev; @@ -641,11 +645,12 @@ int vgpu_probe(struct platform_device *pdev) gk20a_dbg_fn(""); - gk20a = kzalloc(sizeof(struct gk20a), GFP_KERNEL); - if (!gk20a) { + l = kzalloc(sizeof(*l), GFP_KERNEL); + if (!l) { dev_err(dev, "couldn't allocate gk20a support"); return -ENOMEM; } + gk20a = &l->g; nvgpu_kmem_init(gk20a); -- cgit v1.2.2