mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
gpu: nvgpu: Move dev field from gk20a to nvgpu_os_linux
Move field "struct device *dev" from struct gk20a to struct nvgpu_os_linux. The field is valid only for Linux. JIRA NVGPU-38 Change-Id: I09286aa3a9c5a2406e5a27c1fbf21b2c515b4dd4 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: https://git-master/r/1514162 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
dfd42c2b28
commit
cba424539d
@@ -22,6 +22,7 @@
|
||||
|
||||
struct nvgpu_os_linux {
|
||||
struct gk20a g;
|
||||
struct device *dev;
|
||||
|
||||
struct {
|
||||
struct cdev cdev;
|
||||
@@ -75,6 +76,11 @@ static inline struct nvgpu_os_linux *nvgpu_os_linux_from_gk20a(struct gk20a *g)
|
||||
return container_of(g, struct nvgpu_os_linux, g);
|
||||
}
|
||||
|
||||
static inline struct device *dev_from_gk20a(struct gk20a *g)
|
||||
{
|
||||
return nvgpu_os_linux_from_gk20a(g)->dev;
|
||||
}
|
||||
|
||||
#define INTERFACE_NAME "nvhost%s-gpu"
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user