aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/debugfs.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/debugfs.h')
-rw-r--r--include/linux/debugfs.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/include/linux/debugfs.h b/include/linux/debugfs.h
index d84f8c254a87..da4c4983adbe 100644
--- a/include/linux/debugfs.h
+++ b/include/linux/debugfs.h
@@ -20,6 +20,7 @@
20 20
21#include <linux/types.h> 21#include <linux/types.h>
22 22
23struct device;
23struct file_operations; 24struct file_operations;
24 25
25struct debugfs_blob_wrapper { 26struct debugfs_blob_wrapper {
@@ -99,13 +100,18 @@ struct dentry *debugfs_create_u32_array(const char *name, umode_t mode,
99 struct dentry *parent, 100 struct dentry *parent,
100 u32 *array, u32 elements); 101 u32 *array, u32 elements);
101 102
103struct dentry *debugfs_create_devm_seqfile(struct device *dev, const char *name,
104 struct dentry *parent,
105 int (*read_fn)(struct seq_file *s,
106 void *data));
107
102bool debugfs_initialized(void); 108bool debugfs_initialized(void);
103 109
104#else 110#else
105 111
106#include <linux/err.h> 112#include <linux/err.h>
107 113
108/* 114/*
109 * We do not return NULL from these functions if CONFIG_DEBUG_FS is not enabled 115 * We do not return NULL from these functions if CONFIG_DEBUG_FS is not enabled
110 * so users have a chance to detect if there was a real error or not. We don't 116 * so users have a chance to detect if there was a real error or not. We don't
111 * want to duplicate the design decision mistakes of procfs and devfs again. 117 * want to duplicate the design decision mistakes of procfs and devfs again.
@@ -250,6 +256,15 @@ static inline struct dentry *debugfs_create_u32_array(const char *name, umode_t
250 return ERR_PTR(-ENODEV); 256 return ERR_PTR(-ENODEV);
251} 257}
252 258
259static inline struct dentry *debugfs_create_devm_seqfile(struct device *dev,
260 const char *name,
261 struct dentry *parent,
262 int (*read_fn)(struct seq_file *s,
263 void *data))
264{
265 return ERR_PTR(-ENODEV);
266}
267
253#endif 268#endif
254 269
255#endif 270#endif