summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gm20b/clk_gm20b.c
diff options
context:
space:
mode:
authorDavid Nieto <dmartineznie@nvidia.com>2017-03-13 21:45:37 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-03-24 00:05:35 -0400
commit2a502bdd5f3c93b87286456ca901ad43b0f14906 (patch)
treeaba5c18b07b393e0306588d9ba4707a6c272ae6b /drivers/gpu/nvgpu/gm20b/clk_gm20b.c
parenta84f601fbaf6b40e14a321eda1e83d93e55cebba (diff)
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 <dmartineznie@nvidia.com> Reviewed-on: http://git-master/r/1320194 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com> Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> GVS: Gerrit_Virtual_Submit
Diffstat (limited to 'drivers/gpu/nvgpu/gm20b/clk_gm20b.c')
-rw-r--r--drivers/gpu/nvgpu/gm20b/clk_gm20b.c8
1 files changed, 4 insertions, 4 deletions
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)
1751 u64 freq = clk->gpc_pll.clk_in; 1751 u64 freq = clk->gpc_pll.clk_in;
1752 u32 count1, count2; 1752 u32 count1, count2;
1753 1753
1754 err = gk20a_busy(g->dev); 1754 err = gk20a_busy(g);
1755 if (err) 1755 if (err)
1756 return err; 1756 return err;
1757 1757
@@ -1789,7 +1789,7 @@ static int monitor_get(void *data, u64 *val)
1789 gk20a_writel(g, therm_clk_slowdown_r(0), clk_slowdown_save); 1789 gk20a_writel(g, therm_clk_slowdown_r(0), clk_slowdown_save);
1790 nvgpu_mutex_release(&g->clk.clk_mutex); 1790 nvgpu_mutex_release(&g->clk.clk_mutex);
1791 1791
1792 gk20a_idle(g->dev); 1792 gk20a_idle(g);
1793 1793
1794 if (count1 != count2) 1794 if (count1 != count2)
1795 return -EBUSY; 1795 return -EBUSY;
@@ -1807,7 +1807,7 @@ static int voltage_get(void *data, u64 *val)
1807 if (clk->gpc_pll.mode != GPC_PLL_MODE_DVFS) 1807 if (clk->gpc_pll.mode != GPC_PLL_MODE_DVFS)
1808 return -ENOSYS; 1808 return -ENOSYS;
1809 1809
1810 err = gk20a_busy(g->dev); 1810 err = gk20a_busy(g);
1811 if (err) 1811 if (err)
1812 return err; 1812 return err;
1813 1813
@@ -1820,7 +1820,7 @@ static int voltage_get(void *data, u64 *val)
1820 1820
1821 nvgpu_mutex_release(&g->clk.clk_mutex); 1821 nvgpu_mutex_release(&g->clk.clk_mutex);
1822 1822
1823 gk20a_idle(g->dev); 1823 gk20a_idle(g);
1824 return 0; 1824 return 0;
1825} 1825}
1826DEFINE_SIMPLE_ATTRIBUTE(voltage_fops, voltage_get, NULL, "%llu\n"); 1826DEFINE_SIMPLE_ATTRIBUTE(voltage_fops, voltage_get, NULL, "%llu\n");