From 2a502bdd5f3c93b87286456ca901ad43b0f14906 Mon Sep 17 00:00:00 2001 From: David Nieto Date: Mon, 13 Mar 2017 18:45:37 -0700 Subject: gpu: nvgpu: pass gk20a struct to gk20a_busy After driver remove, the device structure passed in gk20a_busy can be invalid. To solve this the prototype of the function is modified to pass the gk20a struct instead of the device pointer. bug 200277762 JIRA: EVLR-1023 Change-Id: I08eb74bd3578834d45115098ed9936ebbb436fdf Signed-off-by: David Nieto Reviewed-on: http://git-master/r/1320194 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: svccoveritychecker Reviewed-by: Terje Bergstrom GVS: Gerrit_Virtual_Submit --- drivers/gpu/nvgpu/gm20b/clk_gm20b.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'drivers/gpu/nvgpu/gm20b/clk_gm20b.c') diff --git a/drivers/gpu/nvgpu/gm20b/clk_gm20b.c b/drivers/gpu/nvgpu/gm20b/clk_gm20b.c index fc352151..07b5d454 100644 --- a/drivers/gpu/nvgpu/gm20b/clk_gm20b.c +++ b/drivers/gpu/nvgpu/gm20b/clk_gm20b.c @@ -1751,7 +1751,7 @@ static int monitor_get(void *data, u64 *val) u64 freq = clk->gpc_pll.clk_in; u32 count1, count2; - err = gk20a_busy(g->dev); + err = gk20a_busy(g); if (err) return err; @@ -1789,7 +1789,7 @@ static int monitor_get(void *data, u64 *val) gk20a_writel(g, therm_clk_slowdown_r(0), clk_slowdown_save); nvgpu_mutex_release(&g->clk.clk_mutex); - gk20a_idle(g->dev); + gk20a_idle(g); if (count1 != count2) return -EBUSY; @@ -1807,7 +1807,7 @@ static int voltage_get(void *data, u64 *val) if (clk->gpc_pll.mode != GPC_PLL_MODE_DVFS) return -ENOSYS; - err = gk20a_busy(g->dev); + err = gk20a_busy(g); if (err) return err; @@ -1820,7 +1820,7 @@ static int voltage_get(void *data, u64 *val) nvgpu_mutex_release(&g->clk.clk_mutex); - gk20a_idle(g->dev); + gk20a_idle(g); return 0; } DEFINE_SIMPLE_ATTRIBUTE(voltage_fops, voltage_get, NULL, "%llu\n"); -- cgit v1.2.2