From 9f65627d0edaa45d914d2d180caf1b687e3c0d09 Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Mon, 19 Jun 2017 14:13:14 -0700 Subject: gpu: nvgpu: Pass struct gk20a to busy and resume Pass struct gk20a pointer to gk20a_busy_noresume() and gk20a_idle_nosuspend(). This reduces the number of dependencies to Linux specific struct device. JIRA NVGPU-38 Change-Id: I5e05be32e2376bc8be5402bb973c20e28c35a1c3 Signed-off-by: Terje Bergstrom Reviewed-on: http://git-master/r/1505177 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/linux/module.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'drivers/gpu/nvgpu/common') diff --git a/drivers/gpu/nvgpu/common/linux/module.c b/drivers/gpu/nvgpu/common/linux/module.c index 7c7cc714..b1638b9e 100644 --- a/drivers/gpu/nvgpu/common/linux/module.c +++ b/drivers/gpu/nvgpu/common/linux/module.c @@ -51,9 +51,9 @@ #define CREATE_TRACE_POINTS #include -void gk20a_busy_noresume(struct device *dev) +void gk20a_busy_noresume(struct gk20a *g) { - pm_runtime_get_noresume(dev); + pm_runtime_get_noresume(dev_from_gk20a(g)); } int gk20a_busy(struct gk20a *g) @@ -103,9 +103,9 @@ fail: return ret < 0 ? ret : 0; } -void gk20a_idle_nosuspend(struct device *dev) +void gk20a_idle_nosuspend(struct gk20a *g) { - pm_runtime_put_noidle(dev); + pm_runtime_put_noidle(dev_from_gk20a(g)); } void gk20a_idle(struct gk20a *g) @@ -760,7 +760,7 @@ static int gk20a_pm_suspend(struct device *dev) int ret = 0; if (g->user_railgate_disabled) - gk20a_idle_nosuspend(dev); + gk20a_idle_nosuspend(g); if (atomic_read(&dev->power.usage_count) > 1) { ret = -EBUSY; @@ -783,7 +783,7 @@ static int gk20a_pm_suspend(struct device *dev) fail: if (g->user_railgate_disabled) - gk20a_busy_noresume(dev); + gk20a_busy_noresume(g); return ret; } @@ -794,7 +794,7 @@ static int gk20a_pm_resume(struct device *dev) int ret = 0; if (g->user_railgate_disabled) - gk20a_busy_noresume(dev); + gk20a_busy_noresume(g); if (!g->suspended) return 0; -- cgit v1.2.2