From 972c42fddf13f658242a4f92124e5fcf194672b3 Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Thu, 27 Jul 2017 13:31:32 -0700 Subject: gpu: nvgpu: Move debugfs fields to os_linux Move all Linux specific debugfs dentry fields to struct nvgpu_os_linux. JIRA NVGPU-62 Change-Id: I615620005f5d042943dd2e478c1629bcc912c550 Signed-off-by: Terje Bergstrom Reviewed-on: https://git-master.nvidia.com/r/1528263 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/pmgr/pmgr.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'drivers/gpu/nvgpu/pmgr/pmgr.c') diff --git a/drivers/gpu/nvgpu/pmgr/pmgr.c b/drivers/gpu/nvgpu/pmgr/pmgr.c index b1c9ef79..3e26dc4d 100644 --- a/drivers/gpu/nvgpu/pmgr/pmgr.c +++ b/drivers/gpu/nvgpu/pmgr/pmgr.c @@ -17,7 +17,6 @@ #ifdef CONFIG_DEBUG_FS #include -#include "gk20a/platform_gk20a.h" #include "common/linux/os_linux.h" #endif @@ -112,22 +111,23 @@ DEFINE_SIMPLE_ATTRIBUTE( DEFINE_SIMPLE_ATTRIBUTE( pmgr_voltage_ctrl_fops, pmgr_pwr_devices_get_voltage_u64, NULL, "%llu\n"); -static void pmgr_debugfs_init(struct gk20a *g) { - struct gk20a_platform *platform = dev_get_drvdata(dev_from_gk20a(g)); +static void pmgr_debugfs_init(struct gk20a *g) +{ + struct nvgpu_os_linux *l = nvgpu_os_linux_from_gk20a(g); struct dentry *dbgentry; dbgentry = debugfs_create_file( - "power", S_IRUGO, platform->debugfs, g, &pmgr_power_ctrl_fops); + "power", S_IRUGO, l->debugfs, g, &pmgr_power_ctrl_fops); if (!dbgentry) nvgpu_err(g, "debugfs entry create failed for power"); dbgentry = debugfs_create_file( - "current", S_IRUGO, platform->debugfs, g, &pmgr_current_ctrl_fops); + "current", S_IRUGO, l->debugfs, g, &pmgr_current_ctrl_fops); if (!dbgentry) nvgpu_err(g, "debugfs entry create failed for current"); dbgentry = debugfs_create_file( - "voltage", S_IRUGO, platform->debugfs, g, &pmgr_voltage_ctrl_fops); + "voltage", S_IRUGO, l->debugfs, g, &pmgr_voltage_ctrl_fops); if (!dbgentry) nvgpu_err(g, "debugfs entry create failed for voltage"); } -- cgit v1.2.2