diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2017-07-27 16:31:32 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-08-04 12:24:02 -0400 |
commit | 972c42fddf13f658242a4f92124e5fcf194672b3 (patch) | |
tree | 8b679b522be90f8980fb05d2641fbb9eaca768d6 /drivers/gpu/nvgpu/pmgr | |
parent | b8efd9d04537d6129e2ce8b067417e46b0e7436f (diff) |
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 <tbergstrom@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1528263
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/pmgr')
-rw-r--r-- | drivers/gpu/nvgpu/pmgr/pmgr.c | 12 |
1 files changed, 6 insertions, 6 deletions
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 @@ | |||
17 | 17 | ||
18 | #ifdef CONFIG_DEBUG_FS | 18 | #ifdef CONFIG_DEBUG_FS |
19 | #include <linux/debugfs.h> | 19 | #include <linux/debugfs.h> |
20 | #include "gk20a/platform_gk20a.h" | ||
21 | #include "common/linux/os_linux.h" | 20 | #include "common/linux/os_linux.h" |
22 | #endif | 21 | #endif |
23 | 22 | ||
@@ -112,22 +111,23 @@ DEFINE_SIMPLE_ATTRIBUTE( | |||
112 | DEFINE_SIMPLE_ATTRIBUTE( | 111 | DEFINE_SIMPLE_ATTRIBUTE( |
113 | pmgr_voltage_ctrl_fops, pmgr_pwr_devices_get_voltage_u64, NULL, "%llu\n"); | 112 | pmgr_voltage_ctrl_fops, pmgr_pwr_devices_get_voltage_u64, NULL, "%llu\n"); |
114 | 113 | ||
115 | static void pmgr_debugfs_init(struct gk20a *g) { | 114 | static void pmgr_debugfs_init(struct gk20a *g) |
116 | struct gk20a_platform *platform = dev_get_drvdata(dev_from_gk20a(g)); | 115 | { |
116 | struct nvgpu_os_linux *l = nvgpu_os_linux_from_gk20a(g); | ||
117 | struct dentry *dbgentry; | 117 | struct dentry *dbgentry; |
118 | 118 | ||
119 | dbgentry = debugfs_create_file( | 119 | dbgentry = debugfs_create_file( |
120 | "power", S_IRUGO, platform->debugfs, g, &pmgr_power_ctrl_fops); | 120 | "power", S_IRUGO, l->debugfs, g, &pmgr_power_ctrl_fops); |
121 | if (!dbgentry) | 121 | if (!dbgentry) |
122 | nvgpu_err(g, "debugfs entry create failed for power"); | 122 | nvgpu_err(g, "debugfs entry create failed for power"); |
123 | 123 | ||
124 | dbgentry = debugfs_create_file( | 124 | dbgentry = debugfs_create_file( |
125 | "current", S_IRUGO, platform->debugfs, g, &pmgr_current_ctrl_fops); | 125 | "current", S_IRUGO, l->debugfs, g, &pmgr_current_ctrl_fops); |
126 | if (!dbgentry) | 126 | if (!dbgentry) |
127 | nvgpu_err(g, "debugfs entry create failed for current"); | 127 | nvgpu_err(g, "debugfs entry create failed for current"); |
128 | 128 | ||
129 | dbgentry = debugfs_create_file( | 129 | dbgentry = debugfs_create_file( |
130 | "voltage", S_IRUGO, platform->debugfs, g, &pmgr_voltage_ctrl_fops); | 130 | "voltage", S_IRUGO, l->debugfs, g, &pmgr_voltage_ctrl_fops); |
131 | if (!dbgentry) | 131 | if (!dbgentry) |
132 | nvgpu_err(g, "debugfs entry create failed for voltage"); | 132 | nvgpu_err(g, "debugfs entry create failed for voltage"); |
133 | } | 133 | } |