From: Ben Widawsky <benjamin.widawsky@intel.com>
To: Intel GFX <intel-gfx@lists.freedesktop.org>
Cc: Ben Widawsky <ben@bwidawsk.net>,
DRI Development <dri-devel@lists.freedesktop.org>,
Ben Widawsky <benjamin.widawsky@intel.com>
Subject: [PATCH 4/6] drm/i915: Use new drm debugfs file helper
Date: Tue, 21 Jan 2014 12:33:20 -0800 [thread overview]
Message-ID: <1390336402-2049-4-git-send-email-benjamin.widawsky@intel.com> (raw)
In-Reply-To: <1390336402-2049-1-git-send-email-benjamin.widawsky@intel.com>
The debugfs helper duplicates the functionality used by Armada, so let's
just use that.
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
---
drivers/gpu/drm/i915/i915_debugfs.c | 25 ++++---------------------
1 file changed, 4 insertions(+), 21 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 473dda2..72b8388 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -3221,24 +3221,6 @@ static int i915_forcewake_create(struct dentry *root, struct drm_minor *minor)
return drm_add_fake_info_node(minor, ent, &i915_forcewake_fops);
}
-static int i915_debugfs_create(struct dentry *root,
- struct drm_minor *minor,
- const char *name,
- const struct file_operations *fops)
-{
- struct drm_device *dev = minor->dev;
- struct dentry *ent;
-
- ent = debugfs_create_file(name,
- S_IRUGO | S_IWUSR,
- root, dev,
- fops);
- if (!ent)
- return -ENOMEM;
-
- return drm_add_fake_info_node(minor, ent, fops);
-}
-
static const struct drm_info_list i915_debugfs_list[] = {
{"i915_capabilities", i915_capabilities, 0},
{"i915_gem_objects", i915_gem_object_info, 0},
@@ -3328,9 +3310,10 @@ int i915_debugfs_init(struct drm_minor *minor)
}
for (i = 0; i < ARRAY_SIZE(i915_debugfs_files); i++) {
- ret = i915_debugfs_create(minor->debugfs_root, minor,
- i915_debugfs_files[i].name,
- i915_debugfs_files[i].fops);
+ ret = drm_debugfs_create_file(minor->debugfs_root, minor,
+ i915_debugfs_files[i].name,
+ i915_debugfs_files[i].fops,
+ S_IRUGO | S_IWUSR);
if (ret)
return ret;
}
--
1.8.5.3
next prev parent reply other threads:[~2014-01-21 20:33 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-14 14:14 [PATCH 1/2] drm: share drm_add_fake_info_node Ben Widawsky
2014-01-14 14:14 ` [PATCH 2/2] drm/i915: Move pipecrc debug functions to new file Ben Widawsky
2014-01-14 23:28 ` Daniel Vetter
2014-01-15 1:22 ` Damien Lespiau
2014-01-15 8:46 ` Daniel Vetter
2014-01-15 20:04 ` Ben Widawsky
2014-01-14 23:25 ` [Intel-gfx] [PATCH 1/2] drm: share drm_add_fake_info_node Daniel Vetter
2014-01-14 23:40 ` Russell King - ARM Linux
2014-01-15 8:39 ` [Intel-gfx] " Daniel Vetter
2014-01-15 8:45 ` Daniel Vetter
2014-01-15 20:08 ` Ben Widawsky
2014-01-15 23:42 ` [Intel-gfx] " Daniel Vetter
2014-01-21 19:05 ` Ben Widawsky
2014-01-21 20:33 ` [PATCH 1/6] drm: Create a debugfs file creation helper Ben Widawsky
2014-01-21 20:33 ` Ben Widawsky [this message]
2014-01-21 20:33 ` [PATCH 5/6] drm/i915: Move forcewake debugfs setup also Ben Widawsky
2014-01-21 20:33 ` [PATCH 6/6] drm/i915: Move pipecrc debug functions to new file Ben Widawsky
2014-01-21 21:44 ` Damien Lespiau
2014-01-21 21:50 ` Damien Lespiau
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1390336402-2049-4-git-send-email-benjamin.widawsky@intel.com \
--to=benjamin.widawsky@intel.com \
--cc=ben@bwidawsk.net \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox