diff options
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/ioctl_channel.c')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/ioctl_channel.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/ioctl_channel.c b/drivers/gpu/nvgpu/common/linux/ioctl_channel.c index 17340e8c..2466db40 100644 --- a/drivers/gpu/nvgpu/common/linux/ioctl_channel.c +++ b/drivers/gpu/nvgpu/common/linux/ioctl_channel.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include "gk20a/dbg_gpu_gk20a.h" | 33 | #include "gk20a/dbg_gpu_gk20a.h" |
34 | #include "gk20a/fence_gk20a.h" | 34 | #include "gk20a/fence_gk20a.h" |
35 | #include "ioctl_channel.h" | 35 | #include "ioctl_channel.h" |
36 | #include "os_linux.h" | ||
36 | 37 | ||
37 | static void gk20a_channel_trace_sched_param( | 38 | static void gk20a_channel_trace_sched_param( |
38 | void (*trace)(int chid, int tsgid, pid_t pid, u32 timeslice, | 39 | void (*trace)(int chid, int tsgid, pid_t pid, u32 timeslice, |
@@ -359,8 +360,9 @@ free_ref: | |||
359 | 360 | ||
360 | int gk20a_channel_open(struct inode *inode, struct file *filp) | 361 | int gk20a_channel_open(struct inode *inode, struct file *filp) |
361 | { | 362 | { |
362 | struct gk20a *g = container_of(inode->i_cdev, | 363 | struct nvgpu_os_linux *l = container_of(inode->i_cdev, |
363 | struct gk20a, channel.cdev); | 364 | struct nvgpu_os_linux, channel.cdev); |
365 | struct gk20a *g = &l->g; | ||
364 | int ret; | 366 | int ret; |
365 | 367 | ||
366 | gk20a_dbg_fn("start"); | 368 | gk20a_dbg_fn("start"); |
@@ -378,6 +380,7 @@ int gk20a_channel_open_ioctl(struct gk20a *g, | |||
378 | struct file *file; | 380 | struct file *file; |
379 | char name[64]; | 381 | char name[64]; |
380 | s32 runlist_id = args->in.runlist_id; | 382 | s32 runlist_id = args->in.runlist_id; |
383 | struct nvgpu_os_linux *l = nvgpu_os_linux_from_gk20a(g); | ||
381 | 384 | ||
382 | err = get_unused_fd_flags(O_RDWR); | 385 | err = get_unused_fd_flags(O_RDWR); |
383 | if (err < 0) | 386 | if (err < 0) |
@@ -387,7 +390,7 @@ int gk20a_channel_open_ioctl(struct gk20a *g, | |||
387 | snprintf(name, sizeof(name), "nvhost-%s-fd%d", | 390 | snprintf(name, sizeof(name), "nvhost-%s-fd%d", |
388 | dev_name(g->dev), fd); | 391 | dev_name(g->dev), fd); |
389 | 392 | ||
390 | file = anon_inode_getfile(name, g->channel.cdev.ops, NULL, O_RDWR); | 393 | file = anon_inode_getfile(name, l->channel.cdev.ops, NULL, O_RDWR); |
391 | if (IS_ERR(file)) { | 394 | if (IS_ERR(file)) { |
392 | err = PTR_ERR(file); | 395 | err = PTR_ERR(file); |
393 | goto clean_up; | 396 | goto clean_up; |