Skip to contentSkip to conversation

drm: Implement dummies for debugfs helpers

PATCH New Thierry Reding 1 participant 1 message Dec 12, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm: Implement dummies for debugfs helpers

In case where debugfs support is disabled, define dummy functions to avoid the need for #ifdefery in drivers.

Based on an earlier patch by Arnd Bergmann.

---
 include/drm/drmP.h | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
include/drm/drmP.h +24 -0
index 1d4a920ef7ff..28beb385380c 100644
@@ -1461,6 +1461,30 @@ extern int drm_debugfs_create_files(const struct drm_info_list *files,
 extern int drm_debugfs_remove_files(const struct drm_info_list *files,
 				    int count, struct drm_minor *minor);
 extern int drm_debugfs_cleanup(struct drm_minor *minor);
+#else
+static inline int drm_debugfs_init(struct drm_minor *minor, int minor_id,
+				   struct dentry *root)
+{
+	return 0;
+}
+
+static inline int drm_debugfs_create_files(const struct drm_info_list *files,
+					   int count, struct dentry *root,
+					   struct drm_minor *minor)
+{
+	return 0;
+}
+
+static inline int drm_debugfs_remove_files(const struct drm_info_list *files,
+					   int count, struct drm_minor *minor)
+{
+	return 0;
+}
+
+static inline int drm_debugfs_cleanup(struct drm_minor *minor)
+{
+	return 0;
+}
 #endif
 
 				/* Info file support */
Signature · 1 line
1.8.4.2