From 324032126f0713d474ba7967f6ad0a220e189180 Mon Sep 17 00:00:00 2001 From: Harry Lin Date: Tue, 11 Apr 2017 13:49:29 +0800 Subject: gpu: nvgpu: fix compile error in non-debugfs case struct gk20a* g is undefined before used by trace_gk10a_pm_unrailgate() if CONFIG_DEBUG_FS is not defined. bug 200289063 Change-Id: Ifd613c8bae3ee05023b72347fbc64c8a9883dcbf Signed-off-by: Harry Lin Reviewed-on: http://git-master/r/1460205 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: svccoveritychecker GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom --- drivers/gpu/nvgpu/gk20a/gk20a.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/gpu/nvgpu/gk20a') diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c index 05e3c3f4..d7446484 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a.c @@ -701,9 +701,9 @@ static int gk20a_pm_unrailgate(struct device *dev) { struct gk20a_platform *platform = dev_get_drvdata(dev); int ret = 0; -#ifdef CONFIG_DEBUG_FS struct gk20a *g = get_gk20a(dev); +#ifdef CONFIG_DEBUG_FS g->pstats.last_rail_ungate_start = jiffies; if (g->pstats.railgating_cycle_count >= 1) g->pstats.total_rail_gate_time_ms = -- cgit v1.2.2