mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] drm: Implement dummies for debugfs helpers
@ 2013-12-12 14:44 Thierry Reding
  0 siblings, 0 replies; only message in thread
From: Thierry Reding @ 2013-12-12 14:44 UTC (permalink / raw)
  To: David Airlie; +Cc: Arnd Bergmann, dri-devel, linux-kernel

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.

Signed-off-by: Thierry Reding <treding@nvidia.com>
---
 include/drm/drmP.h | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index 1d4a920ef7ff..28beb385380c 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -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 */
-- 
1.8.4.2


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-12-12 14:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-12 14:44 [PATCH] drm: Implement dummies for debugfs helpers Thierry Reding

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®