diff options
Diffstat (limited to 'backport/backport-include/linux/debugfs.h')
-rw-r--r-- | backport/backport-include/linux/debugfs.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/backport/backport-include/linux/debugfs.h b/backport/backport-include/linux/debugfs.h index a6843532..5ea4bfbe 100644 --- a/backport/backport-include/linux/debugfs.h +++ b/backport/backport-include/linux/debugfs.h @@ -24,4 +24,19 @@ static inline struct dentry *debugfs_create_devm_seqfile(struct device *dev, #endif /* CONFIG_DEBUG_FS */ #endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0) */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(4,4,0) +#define debugfs_create_bool LINUX_BACKPORT(debugfs_create_bool) +#ifdef CONFIG_DEBUG_FS +struct dentry *debugfs_create_bool(const char *name, umode_t mode, + struct dentry *parent, bool *value); +#else +static inline struct dentry * +debugfs_create_bool(const char *name, umode_t mode, + struct dentry *parent, bool *value) +{ + return ERR_PTR(-ENODEV); +} +#endif +#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(4,4,0) */ + #endif /* __BACKPORT_DEBUGFS_H_ */ |