From f72d655eac654cdcb78596d5ec61313ff3389e3c Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Fri, 8 Apr 2016 12:48:48 -0700 Subject: gpu: nvgpu: Remove global gk20a_device Remove static variable gk20a_device which held a pointer to struct device. nvgpu can serve multiple GPUs, so a static pointer does not work. Change-Id: I79faf5c26658490c955a9b15137e5f671650fd28 Signed-off-by: Terje Bergstrom Reviewed-on: http://git-master/r/1123940 GVS: Gerrit_Virtual_Submit Reviewed-by: Alex Waterman --- drivers/gpu/nvgpu/gk20a/debug_gk20a.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'drivers') diff --git a/drivers/gpu/nvgpu/gk20a/debug_gk20a.c b/drivers/gpu/nvgpu/gk20a/debug_gk20a.c index 369fbe29..c2285c8a 100644 --- a/drivers/gpu/nvgpu/gk20a/debug_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/debug_gk20a.c @@ -32,7 +32,6 @@ #include "hw_pbdma_gk20a.h" unsigned int gk20a_debug_trace_cmdbuf; -static struct device *gk20a_device; struct ch_state { int pid; @@ -336,12 +335,13 @@ void gk20a_debug_dump_device(void *data) .fn = gk20a_debug_write_printk }; struct gk20a *g; + struct device *dev = data; /* In pre-silicon we don't need full spew on stuck syncpoint */ if (!tegra_platform_is_silicon()) return; - g = gk20a_from_dev(gk20a_device); + g = gk20a_from_dev(dev); /* HAL only initialized after 1st power-on */ if (g->ops.debug.show_dump) g->ops.debug.show_dump(g, &o); @@ -397,10 +397,6 @@ void gk20a_debug_init(struct device *dev) { struct gk20a_platform *platform = dev_get_drvdata(dev); - /* Store the first device */ - if (!gk20a_device) - gk20a_device = dev; - platform->debugfs = debugfs_create_dir(dev_name(dev), NULL); if (platform->debugfs) { platform->debugfs_alias = -- cgit v1.2.2