From 192cf8c1f8d1005ab08619c9152d514dec3a34ef Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Fri, 4 Aug 2017 09:49:48 -0700 Subject: gpu: nvgpu: Pass struct gk20a to gk20a_wait_for_idle() Pass struct gk20a pointer instead of struct device to gk20a_wait_for_idle(). The code is not Linux specific and does not need pointer to struct device. Change-Id: I2cafd6c7db019c9de76b6e68a1ae73f0b4cea37d Signed-off-by: Terje Bergstrom Reviewed-on: https://git-master.nvidia.com/r/1533173 GVS: Gerrit_Virtual_Submit Reviewed-by: Alex Waterman --- drivers/gpu/nvgpu/gk20a/gk20a.c | 3 +-- drivers/gpu/nvgpu/gk20a/gk20a.h | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a') diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c index 7bd6acfd..c50d800f 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a.c @@ -362,9 +362,8 @@ int gk20a_can_busy(struct gk20a *g) return 1; } -int gk20a_wait_for_idle(struct device *dev) +int gk20a_wait_for_idle(struct gk20a *g) { - struct gk20a *g = get_gk20a(dev); int wait_length = 150; /* 3 second overall max wait. */ int target_usage_count = 0; diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h index aeba1fcd..4517f6e0 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a.h @@ -1455,7 +1455,7 @@ int __gk20a_do_idle(struct gk20a *g, bool force_reset); int __gk20a_do_unidle(struct gk20a *g); int gk20a_can_busy(struct gk20a *g); -int gk20a_wait_for_idle(struct device *dev); +int gk20a_wait_for_idle(struct gk20a *g); #define NVGPU_GPU_ARCHITECTURE_SHIFT 4 -- cgit v1.2.2