aboutsummaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorRichard Fitzgerald <rf@opensource.wolfsonmicro.com>2015-06-23 14:32:54 +0100
committerViresh Kumar <viresh.kumar@linaro.org>2016-04-01 10:52:49 +0530
commite982b5a95244f9fc460d2c57b75c1f84ea6e8b03 (patch)
treee6d80a68eee6cfbbee71064d949c5ed4388ab5b5 /include/linux
parent31aefb155825104fdaff74151e326016018cc8dd (diff)
debugfs: Export bool read/write functions
The file read/write functions for bools have no special dependencies on debugfs internals and are sufficiently non-trivial to be worth exporting so clients can re-use the implementation. Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/debugfs.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/linux/debugfs.h b/include/linux/debugfs.h
index cb25af461054..154596291056 100644
--- a/include/linux/debugfs.h
+++ b/include/linux/debugfs.h
@@ -117,6 +117,12 @@ struct dentry *debugfs_create_devm_seqfile(struct device *dev, const char *name,
bool debugfs_initialized(void);
+ssize_t debugfs_read_file_bool(struct file *file, char __user *user_buf,
+ size_t count, loff_t *ppos);
+
+ssize_t debugfs_write_file_bool(struct file *file, const char __user *user_buf,
+ size_t count, loff_t *ppos);
+
#else
#include <linux/err.h>
@@ -283,6 +289,20 @@ static inline struct dentry *debugfs_create_devm_seqfile(struct device *dev,
return ERR_PTR(-ENODEV);
}
+static inline ssize_t debugfs_read_file_bool(struct file *file,
+ char __user *user_buf,
+ size_t count, loff_t *ppos)
+{
+ return -ENODEV;
+}
+
+static inline ssize_t debugfs_write_file_bool(struct file *file,
+ const char __user *user_buf,
+ size_t count, loff_t *ppos)
+{
+ return -ENODEV;
+}
+
#endif
#endif