diff options
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/os_linux.h')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/os_linux.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/os_linux.h b/drivers/gpu/nvgpu/common/linux/os_linux.h index e39d3c4d..cf012acc 100644 --- a/drivers/gpu/nvgpu/common/linux/os_linux.h +++ b/drivers/gpu/nvgpu/common/linux/os_linux.h | |||
@@ -22,6 +22,7 @@ | |||
22 | 22 | ||
23 | struct nvgpu_os_linux { | 23 | struct nvgpu_os_linux { |
24 | struct gk20a g; | 24 | struct gk20a g; |
25 | struct device *dev; | ||
25 | 26 | ||
26 | struct { | 27 | struct { |
27 | struct cdev cdev; | 28 | struct cdev cdev; |
@@ -75,6 +76,11 @@ static inline struct nvgpu_os_linux *nvgpu_os_linux_from_gk20a(struct gk20a *g) | |||
75 | return container_of(g, struct nvgpu_os_linux, g); | 76 | return container_of(g, struct nvgpu_os_linux, g); |
76 | } | 77 | } |
77 | 78 | ||
79 | static inline struct device *dev_from_gk20a(struct gk20a *g) | ||
80 | { | ||
81 | return nvgpu_os_linux_from_gk20a(g)->dev; | ||
82 | } | ||
83 | |||
78 | #define INTERFACE_NAME "nvhost%s-gpu" | 84 | #define INTERFACE_NAME "nvhost%s-gpu" |
79 | 85 | ||
80 | #endif | 86 | #endif |