diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/sched_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/sched_gk20a.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/sched_gk20a.c b/drivers/gpu/nvgpu/gk20a/sched_gk20a.c index 3f3119af..014848ba 100644 --- a/drivers/gpu/nvgpu/gk20a/sched_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/sched_gk20a.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include "gk20a.h" | 25 | #include "gk20a.h" |
26 | #include "gr_gk20a.h" | 26 | #include "gr_gk20a.h" |
27 | #include "sched_gk20a.h" | 27 | #include "sched_gk20a.h" |
28 | #include "common/linux/os_linux.h" | ||
28 | 29 | ||
29 | #include <nvgpu/hw/gk20a/hw_ctxsw_prog_gk20a.h> | 30 | #include <nvgpu/hw/gk20a/hw_ctxsw_prog_gk20a.h> |
30 | #include <nvgpu/hw/gk20a/hw_gr_gk20a.h> | 31 | #include <nvgpu/hw/gk20a/hw_gr_gk20a.h> |
@@ -370,12 +371,13 @@ static int gk20a_sched_dev_ioctl_put_tsg(struct gk20a_sched_ctrl *sched, | |||
370 | 371 | ||
371 | int gk20a_sched_dev_open(struct inode *inode, struct file *filp) | 372 | int gk20a_sched_dev_open(struct inode *inode, struct file *filp) |
372 | { | 373 | { |
373 | struct gk20a *g = container_of(inode->i_cdev, | 374 | struct nvgpu_os_linux *l = container_of(inode->i_cdev, |
374 | struct gk20a, sched.cdev); | 375 | struct nvgpu_os_linux, sched.cdev); |
376 | struct gk20a *g; | ||
375 | struct gk20a_sched_ctrl *sched; | 377 | struct gk20a_sched_ctrl *sched; |
376 | int err = 0; | 378 | int err = 0; |
377 | 379 | ||
378 | g = gk20a_get(g); | 380 | g = gk20a_get(&l->g); |
379 | if (!g) | 381 | if (!g) |
380 | return -ENODEV; | 382 | return -ENODEV; |
381 | sched = &g->sched_ctrl; | 383 | sched = &g->sched_ctrl; |