@@ -141,7 +141,7 @@ static int drm_debugfs_dev_show(struct seq_file *m, void *unused)
struct drm_debugfs_entry *entry = m->private;
int (*show)(struct seq_file *, struct drm_device *, void *) = entry->file.show;
- return show(m, entry->dev, entry->file.data);
+ return show(m, entry->object, entry->file.data);
}
static int drm_debugfs_open(struct inode *inode, struct file *file)
@@ -362,7 +362,7 @@ void drm_debugfs_add_file(struct drm_device *dev, const char *name,
entry->file.name = name;
entry->file.show = show;
entry->file.data = data;
- entry->dev = dev;
+ entry->object = dev;
drm_debugfs_files_add(dev->debugfs_files, &entry->list);
}
@@ -130,8 +130,8 @@ struct drm_debugfs_info {
* drm_debugfs_info on a &struct drm_device.
*/
struct drm_debugfs_entry {
- /** @dev: &struct drm_device for this node. */
- struct drm_device *dev;
+ /** @object: The DRM object that owns this node. */
+ void *object;
/** @file: Template for this node. */
struct drm_debugfs_info file;
In order to turn the API more expansible to other DRM objects, such as the struct drm_connector, make the struct drm_debugfs_entry hold a void pointer and cast the void pointer to the struct drm_device when needed. Signed-off-by: Maíra Canal <mcanal@igalia.com> --- drivers/gpu/drm/drm_debugfs.c | 4 ++-- include/drm/drm_debugfs.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)