summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/linux/platform_gp10b_tegra.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/platform_gp10b_tegra.c')
-rw-r--r--drivers/gpu/nvgpu/common/linux/platform_gp10b_tegra.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/platform_gp10b_tegra.c b/drivers/gpu/nvgpu/common/linux/platform_gp10b_tegra.c
index 5d7ee84d..a2506341 100644
--- a/drivers/gpu/nvgpu/common/linux/platform_gp10b_tegra.c
+++ b/drivers/gpu/nvgpu/common/linux/platform_gp10b_tegra.c
@@ -67,8 +67,6 @@ static struct {
67 {"gpu", GPCCLK_INIT_RATE}, 67 {"gpu", GPCCLK_INIT_RATE},
68 {"gpu_sys", 204000000} }; 68 {"gpu_sys", 204000000} };
69 69
70static void gr_gp10b_remove_sysfs(struct device *dev);
71
72/* 70/*
73 * gp10b_tegra_get_clocks() 71 * gp10b_tegra_get_clocks()
74 * 72 *
@@ -174,9 +172,12 @@ static int gp10b_tegra_late_probe(struct device *dev)
174 return 0; 172 return 0;
175} 173}
176 174
177int gp10b_tegra_remove(struct device *dev) 175static int gp10b_tegra_remove(struct device *dev)
178{ 176{
179 gr_gp10b_remove_sysfs(dev); 177 struct gk20a *g = get_gk20a(dev);
178
179 if (g->ops.gr.remove_gr_sysfs)
180 g->ops.gr.remove_gr_sysfs(g);
180 181
181 /* deinitialise tegra specific scaling quirks */ 182 /* deinitialise tegra specific scaling quirks */
182 gp10b_tegra_scale_exit(dev); 183 gp10b_tegra_scale_exit(dev);
@@ -792,9 +793,9 @@ void gr_gp10b_create_sysfs(struct gk20a *g)
792 dev_err(dev, "Failed to create sysfs attributes!\n"); 793 dev_err(dev, "Failed to create sysfs attributes!\n");
793} 794}
794 795
795static void gr_gp10b_remove_sysfs(struct device *dev) 796void gr_gp10b_remove_sysfs(struct gk20a *g)
796{ 797{
797 struct gk20a *g = get_gk20a(dev); 798 struct device *dev = dev_from_gk20a(g);
798 799
799 if (!g->ecc.gr.sm_lrf_single_err_count.counters) 800 if (!g->ecc.gr.sm_lrf_single_err_count.counters)
800 return; 801 return;