summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/linux/nvhost.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/nvhost.c')
-rw-r--r--drivers/gpu/nvgpu/common/linux/nvhost.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/nvhost.c b/drivers/gpu/nvgpu/common/linux/nvhost.c
index 96865f7d..8e337529 100644
--- a/drivers/gpu/nvgpu/common/linux/nvhost.c
+++ b/drivers/gpu/nvgpu/common/linux/nvhost.c
@@ -23,10 +23,11 @@
23#include "nvhost_priv.h" 23#include "nvhost_priv.h"
24 24
25#include "gk20a/gk20a.h" 25#include "gk20a/gk20a.h"
26#include "gk20a/platform_gk20a.h"
26 27
27int nvgpu_get_nvhost_dev(struct gk20a *g) 28int nvgpu_get_nvhost_dev(struct gk20a *g)
28{ 29{
29 struct device_node *np = g->dev->of_node; 30 struct device_node *np = dev_from_gk20a(g)->of_node;
30 struct platform_device *host1x_pdev = NULL; 31 struct platform_device *host1x_pdev = NULL;
31 const __be32 *host1x_ptr; 32 const __be32 *host1x_ptr;
32 33
@@ -151,7 +152,7 @@ int nvgpu_nvhost_syncpt_read_ext_check(
151 152
152int nvgpu_nvhost_create_symlink(struct gk20a *g) 153int nvgpu_nvhost_create_symlink(struct gk20a *g)
153{ 154{
154 struct device *dev = g->dev; 155 struct device *dev = dev_from_gk20a(g);
155 int err = 0; 156 int err = 0;
156 157
157 if (g->nvhost_dev && 158 if (g->nvhost_dev &&
@@ -166,7 +167,7 @@ int nvgpu_nvhost_create_symlink(struct gk20a *g)
166 167
167void nvgpu_nvhost_remove_symlink(struct gk20a *g) 168void nvgpu_nvhost_remove_symlink(struct gk20a *g)
168{ 169{
169 struct device *dev = g->dev; 170 struct device *dev = dev_from_gk20a(g);
170 171
171 if (g->nvhost_dev && 172 if (g->nvhost_dev &&
172 (dev->parent != &g->nvhost_dev->host1x_pdev->dev)) { 173 (dev->parent != &g->nvhost_dev->host1x_pdev->dev)) {