diff options
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/debug_clk.c')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/debug_clk.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/debug_clk.c b/drivers/gpu/nvgpu/common/linux/debug_clk.c index 8ffba3c8..b265ca69 100644 --- a/drivers/gpu/nvgpu/common/linux/debug_clk.c +++ b/drivers/gpu/nvgpu/common/linux/debug_clk.c | |||
@@ -217,49 +217,49 @@ static const struct file_operations pll_param_fops = { | |||
217 | 217 | ||
218 | int gm20b_clk_init_debugfs(struct gk20a *g) | 218 | int gm20b_clk_init_debugfs(struct gk20a *g) |
219 | { | 219 | { |
220 | struct nvgpu_os_linux *l = nvgpu_os_linux_from_gk20a(g); | ||
220 | struct dentry *d; | 221 | struct dentry *d; |
221 | struct gk20a_platform *platform = dev_get_drvdata(dev_from_gk20a(g)); | ||
222 | 222 | ||
223 | if (!platform->debugfs) | 223 | if (!l->debugfs) |
224 | return -EINVAL; | 224 | return -EINVAL; |
225 | 225 | ||
226 | d = debugfs_create_file( | 226 | d = debugfs_create_file( |
227 | "rate", S_IRUGO|S_IWUSR, platform->debugfs, g, &rate_fops); | 227 | "rate", S_IRUGO|S_IWUSR, l->debugfs, g, &rate_fops); |
228 | if (!d) | 228 | if (!d) |
229 | goto err_out; | 229 | goto err_out; |
230 | 230 | ||
231 | d = debugfs_create_file( | 231 | d = debugfs_create_file( |
232 | "pll_reg", S_IRUGO, platform->debugfs, g, &pll_reg_fops); | 232 | "pll_reg", S_IRUGO, l->debugfs, g, &pll_reg_fops); |
233 | if (!d) | 233 | if (!d) |
234 | goto err_out; | 234 | goto err_out; |
235 | 235 | ||
236 | d = debugfs_create_file("pll_reg_raw", | 236 | d = debugfs_create_file("pll_reg_raw", |
237 | S_IRUGO, platform->debugfs, g, &pll_reg_raw_fops); | 237 | S_IRUGO, l->debugfs, g, &pll_reg_raw_fops); |
238 | if (!d) | 238 | if (!d) |
239 | goto err_out; | 239 | goto err_out; |
240 | 240 | ||
241 | d = debugfs_create_file( | 241 | d = debugfs_create_file( |
242 | "monitor", S_IRUGO, platform->debugfs, g, &monitor_fops); | 242 | "monitor", S_IRUGO, l->debugfs, g, &monitor_fops); |
243 | if (!d) | 243 | if (!d) |
244 | goto err_out; | 244 | goto err_out; |
245 | 245 | ||
246 | d = debugfs_create_file( | 246 | d = debugfs_create_file( |
247 | "voltage", S_IRUGO, platform->debugfs, g, &voltage_fops); | 247 | "voltage", S_IRUGO, l->debugfs, g, &voltage_fops); |
248 | if (!d) | 248 | if (!d) |
249 | goto err_out; | 249 | goto err_out; |
250 | 250 | ||
251 | d = debugfs_create_file( | 251 | d = debugfs_create_file( |
252 | "pll_param", S_IRUGO, platform->debugfs, g, &pll_param_fops); | 252 | "pll_param", S_IRUGO, l->debugfs, g, &pll_param_fops); |
253 | if (!d) | 253 | if (!d) |
254 | goto err_out; | 254 | goto err_out; |
255 | 255 | ||
256 | d = debugfs_create_u32("pll_na_mode", S_IRUGO, platform->debugfs, | 256 | d = debugfs_create_u32("pll_na_mode", S_IRUGO, l->debugfs, |
257 | (u32 *)&g->clk.gpc_pll.mode); | 257 | (u32 *)&g->clk.gpc_pll.mode); |
258 | if (!d) | 258 | if (!d) |
259 | goto err_out; | 259 | goto err_out; |
260 | 260 | ||
261 | d = debugfs_create_u32("fmax2x_at_vmin_safe_t", S_IRUGO, | 261 | d = debugfs_create_u32("fmax2x_at_vmin_safe_t", S_IRUGO, |
262 | platform->debugfs, (u32 *)&g->clk.dvfs_safe_max_freq); | 262 | l->debugfs, (u32 *)&g->clk.dvfs_safe_max_freq); |
263 | if (!d) | 263 | if (!d) |
264 | goto err_out; | 264 | goto err_out; |
265 | 265 | ||
@@ -267,6 +267,6 @@ int gm20b_clk_init_debugfs(struct gk20a *g) | |||
267 | 267 | ||
268 | err_out: | 268 | err_out: |
269 | pr_err("%s: Failed to make debugfs node\n", __func__); | 269 | pr_err("%s: Failed to make debugfs node\n", __func__); |
270 | debugfs_remove_recursive(platform->debugfs); | 270 | debugfs_remove_recursive(l->debugfs); |
271 | return -ENOMEM; | 271 | return -ENOMEM; |
272 | } | 272 | } |