diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2017-06-21 18:56:05 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-06-30 21:34:59 -0400 |
commit | bab823973b0630e2f4515d5aabbe4fb46cdf3195 (patch) | |
tree | 9e19ed71ed9a57b15a3f3b48ffbbbc1b196bf4d6 /drivers/gpu/nvgpu/common/linux/module.c | |
parent | 6f0fcbc667ca55ed25818467069853e6d750cd7d (diff) |
gpu: nvgpu: Use accessor for finding struct device
Use dev_from_gk20a() accessor whenever accessing struct device * from
struct gk20a.
JIRA NVGPU-38
Change-Id: Ide9fca3a56436c8f62e7872580a766c4c1e2353e
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: https://git-master/r/1507930
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/module.c')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/module.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/module.c b/drivers/gpu/nvgpu/common/linux/module.c index bb7e260d..b107a721 100644 --- a/drivers/gpu/nvgpu/common/linux/module.c +++ b/drivers/gpu/nvgpu/common/linux/module.c | |||
@@ -78,7 +78,7 @@ int gk20a_busy(struct gk20a *g) | |||
78 | goto fail; | 78 | goto fail; |
79 | } | 79 | } |
80 | 80 | ||
81 | dev = g->dev; | 81 | dev = dev_from_gk20a(g); |
82 | 82 | ||
83 | if (pm_runtime_enabled(dev)) { | 83 | if (pm_runtime_enabled(dev)) { |
84 | ret = pm_runtime_get_sync(dev); | 84 | ret = pm_runtime_get_sync(dev); |
@@ -116,7 +116,7 @@ void gk20a_idle(struct gk20a *g) | |||
116 | 116 | ||
117 | atomic_dec(&g->usage_count); | 117 | atomic_dec(&g->usage_count); |
118 | 118 | ||
119 | dev = g->dev; | 119 | dev = dev_from_gk20a(g); |
120 | 120 | ||
121 | if (!(dev && gk20a_can_busy(g))) | 121 | if (!(dev && gk20a_can_busy(g))) |
122 | return; | 122 | return; |
@@ -175,7 +175,7 @@ int gk20a_pm_finalize_poweron(struct device *dev) | |||
175 | enable_irq(g->irq_nonstall); | 175 | enable_irq(g->irq_nonstall); |
176 | g->irqs_enabled = 1; | 176 | g->irqs_enabled = 1; |
177 | 177 | ||
178 | gk20a_scale_resume(g->dev); | 178 | gk20a_scale_resume(dev_from_gk20a(g)); |
179 | 179 | ||
180 | if (platform->has_cde) | 180 | if (platform->has_cde) |
181 | gk20a_init_cde_support(g); | 181 | gk20a_init_cde_support(g); |
@@ -269,7 +269,7 @@ static struct of_device_id tegra_gk20a_of_match[] = { | |||
269 | */ | 269 | */ |
270 | int __gk20a_do_idle(struct gk20a *g, bool force_reset) | 270 | int __gk20a_do_idle(struct gk20a *g, bool force_reset) |
271 | { | 271 | { |
272 | struct device *dev = g->dev; | 272 | struct device *dev = dev_from_gk20a(g); |
273 | struct gk20a_platform *platform = dev_get_drvdata(dev); | 273 | struct gk20a_platform *platform = dev_get_drvdata(dev); |
274 | struct nvgpu_timeout timeout; | 274 | struct nvgpu_timeout timeout; |
275 | int ref_cnt; | 275 | int ref_cnt; |
@@ -410,7 +410,7 @@ static int gk20a_do_idle(void *_g) | |||
410 | */ | 410 | */ |
411 | int __gk20a_do_unidle(struct gk20a *g) | 411 | int __gk20a_do_unidle(struct gk20a *g) |
412 | { | 412 | { |
413 | struct device *dev = g->dev; | 413 | struct device *dev = dev_from_gk20a(g); |
414 | struct gk20a_platform *platform = dev_get_drvdata(dev); | 414 | struct gk20a_platform *platform = dev_get_drvdata(dev); |
415 | int err; | 415 | int err; |
416 | 416 | ||