summaryrefslogtreecommitdiffstats
path: root/include/drm/drmP.h
diff options
context:
space:
mode:
authorThierry Reding2013-12-12 15:44:04 +0100
committerDave Airlie2013-12-18 01:58:11 +0100
commit66ee52e284a6cb387a7b28e29e8282da253efc97 (patch)
tree12deaee9910ab92e90dcbb4f4326096254478cda /include/drm/drmP.h
parentvideo/fb: Propagate error code from failing to unregister conflicting fb (diff)
downloadkernel-qcow2-linux-66ee52e284a6cb387a7b28e29e8282da253efc97.tar.gz
kernel-qcow2-linux-66ee52e284a6cb387a7b28e29e8282da253efc97.tar.xz
kernel-qcow2-linux-66ee52e284a6cb387a7b28e29e8282da253efc97.zip
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. Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'include/drm/drmP.h')
-rw-r--r--include/drm/drmP.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index bc07c7af0f6e..8f916d03a638 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -1478,6 +1478,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 */