aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2014-05-28 07:46:12 -0400
committerThierry Reding <treding@nvidia.com>2014-06-06 02:38:31 -0400
commit1b0c7b48409c7faf241813bbf24588f3d676208f (patch)
tree4b4db23a47651727b117291d7a215f722c3b1d11
parent9578184efa6b93f71f34744351a6a8caa79d6cda (diff)
drm/tegra: sor - Make debugfs setup consistent
Other output drivers set up debugfs slightly differently. Bring the SOR driver in line with those for consistency. Signed-off-by: Thierry Reding <treding@nvidia.com>
-rw-r--r--drivers/gpu/drm/tegra/sor.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/gpu/drm/tegra/sor.c b/drivers/gpu/drm/tegra/sor.c
index 06f800917738..93ae4fac8ac2 100644
--- a/drivers/gpu/drm/tegra/sor.c
+++ b/drivers/gpu/drm/tegra/sor.c
@@ -1007,12 +1007,13 @@ static const struct file_operations tegra_sor_crc_fops = {
1007 .release = tegra_sor_crc_release, 1007 .release = tegra_sor_crc_release,
1008}; 1008};
1009 1009
1010static int tegra_sor_debugfs_init(struct tegra_sor *sor, struct dentry *root) 1010static int tegra_sor_debugfs_init(struct tegra_sor *sor,
1011 struct drm_minor *minor)
1011{ 1012{
1012 struct dentry *entry; 1013 struct dentry *entry;
1013 int err = 0; 1014 int err = 0;
1014 1015
1015 sor->debugfs = debugfs_create_dir("sor", root); 1016 sor->debugfs = debugfs_create_dir("sor", minor->debugfs_root);
1016 if (!sor->debugfs) 1017 if (!sor->debugfs)
1017 return -ENOMEM; 1018 return -ENOMEM;
1018 1019
@@ -1021,7 +1022,7 @@ static int tegra_sor_debugfs_init(struct tegra_sor *sor, struct dentry *root)
1021 if (!entry) { 1022 if (!entry) {
1022 dev_err(sor->dev, 1023 dev_err(sor->dev,
1023 "cannot create /sys/kernel/debug/dri/%s/sor/crc\n", 1024 "cannot create /sys/kernel/debug/dri/%s/sor/crc\n",
1024 root->d_name.name); 1025 minor->debugfs_root->d_name.name);
1025 err = -ENOMEM; 1026 err = -ENOMEM;
1026 goto remove; 1027 goto remove;
1027 } 1028 }
@@ -1063,9 +1064,7 @@ static int tegra_sor_init(struct host1x_client *client)
1063 } 1064 }
1064 1065
1065 if (IS_ENABLED(CONFIG_DEBUG_FS)) { 1066 if (IS_ENABLED(CONFIG_DEBUG_FS)) {
1066 struct dentry *root = drm->primary->debugfs_root; 1067 err = tegra_sor_debugfs_init(sor, drm->primary);
1067
1068 err = tegra_sor_debugfs_init(sor, root);
1069 if (err < 0) 1068 if (err < 0)
1070 dev_err(sor->dev, "debugfs setup failed: %d\n", err); 1069 dev_err(sor->dev, "debugfs setup failed: %d\n", err);
1071 } 1070 }