[PATCH 5/6] drm/debugfs: Make the struct drm_debugfs_entry independent of DRM device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 drivers/gpu/drm/drm_debugfs.c | 2 +-
 include/drm/drm_debugfs.h     | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/drm_debugfs.c b/drivers/gpu/drm/drm_debugfs.c
index 2d1e3072065a..912f5c0a4ad5 100644
--- a/drivers/gpu/drm/drm_debugfs.c
+++ b/drivers/gpu/drm/drm_debugfs.c
@@ -356,7 +356,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_list_add(&entry->list, &dev->debugfs_list);
 }
diff --git a/include/drm/drm_debugfs.h b/include/drm/drm_debugfs.h
index b4e22e7d4016..d1243b433997 100644
--- a/include/drm/drm_debugfs.h
+++ b/include/drm/drm_debugfs.h
@@ -131,8 +131,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;
-- 
2.39.0




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux