diff options
| author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2015-01-15 12:46:14 -0500 |
|---|---|---|
| committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2015-01-15 12:46:14 -0500 |
| commit | 0c49cd295d42d0032af11d55e2140dbec11dc8d0 (patch) | |
| tree | 1e7d0e50b6b6d6e4de1fb6bb0b6d856c3932da58 /include/linux/debugfs.h | |
| parent | 0c3e99437a66e4c869c60c2398449e6d98f3a988 (diff) | |
| parent | eaa27f34e91a14cdceed26ed6c6793ec1d186115 (diff) | |
Merge tag 'v3.19-rc4' into next
Merge with mainline to bring in the latest thermal and other changes.
Diffstat (limited to 'include/linux/debugfs.h')
| -rw-r--r-- | include/linux/debugfs.h | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/include/linux/debugfs.h b/include/linux/debugfs.h index 4d0b4d1aa132..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 | ||
| 23 | struct device; | ||
| 23 | struct file_operations; | 24 | struct file_operations; |
| 24 | 25 | ||
| 25 | struct debugfs_blob_wrapper { | 26 | struct debugfs_blob_wrapper { |
| @@ -92,20 +93,25 @@ struct dentry *debugfs_create_regset32(const char *name, umode_t mode, | |||
| 92 | struct dentry *parent, | 93 | struct dentry *parent, |
| 93 | struct debugfs_regset32 *regset); | 94 | struct debugfs_regset32 *regset); |
| 94 | 95 | ||
| 95 | int debugfs_print_regs32(struct seq_file *s, const struct debugfs_reg32 *regs, | 96 | void debugfs_print_regs32(struct seq_file *s, const struct debugfs_reg32 *regs, |
| 96 | int nregs, void __iomem *base, char *prefix); | 97 | int nregs, void __iomem *base, char *prefix); |
| 97 | 98 | ||
| 98 | struct dentry *debugfs_create_u32_array(const char *name, umode_t mode, | 99 | 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 | ||
| 103 | struct 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 | |||
| 102 | bool debugfs_initialized(void); | 108 | bool 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. |
| @@ -233,10 +239,9 @@ static inline struct dentry *debugfs_create_regset32(const char *name, | |||
| 233 | return ERR_PTR(-ENODEV); | 239 | return ERR_PTR(-ENODEV); |
| 234 | } | 240 | } |
| 235 | 241 | ||
| 236 | static inline int debugfs_print_regs32(struct seq_file *s, const struct debugfs_reg32 *regs, | 242 | static inline void debugfs_print_regs32(struct seq_file *s, const struct debugfs_reg32 *regs, |
| 237 | int nregs, void __iomem *base, char *prefix) | 243 | int nregs, void __iomem *base, char *prefix) |
| 238 | { | 244 | { |
| 239 | return 0; | ||
| 240 | } | 245 | } |
| 241 | 246 | ||
| 242 | static inline bool debugfs_initialized(void) | 247 | static inline bool debugfs_initialized(void) |
| @@ -251,6 +256,15 @@ static inline struct dentry *debugfs_create_u32_array(const char *name, umode_t | |||
| 251 | return ERR_PTR(-ENODEV); | 256 | return ERR_PTR(-ENODEV); |
| 252 | } | 257 | } |
| 253 | 258 | ||
| 259 | static 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 | |||
| 254 | #endif | 268 | #endif |
| 255 | 269 | ||
| 256 | #endif | 270 | #endif |
