diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org.(none)> | 2005-04-19 13:14:28 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org.(none)> | 2005-04-19 13:14:28 -0700 |
commit | 9f6c6fc505560465be0964eb4da1b6ca97bd3951 (patch) | |
tree | 9660991b5e417ad7bb74e105c037ff358f60ba27 /include | |
parent | c3c661932cd53582c5b03692b99649300977248a (diff) | |
parent | f0e035f4b6940aae6836500b642029c289ed4535 (diff) | |
download | linux-9f6c6fc505560465be0964eb4da1b6ca97bd3951.tar.bz2 |
Merge with kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6.git/
for 13 driver core, sysfs, and debugfs fixes.
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/debugfs.h | 13 | ||||
-rw-r--r-- | include/linux/sysfs.h | 7 |
2 files changed, 17 insertions, 3 deletions
diff --git a/include/linux/debugfs.h b/include/linux/debugfs.h index f7a7b86f6eef..a5fa6a6eede8 100644 --- a/include/linux/debugfs.h +++ b/include/linux/debugfs.h @@ -17,6 +17,10 @@ #include <linux/fs.h> +#include <linux/types.h> + +struct file_operations; + #if defined(CONFIG_DEBUG_FS) struct dentry *debugfs_create_file(const char *name, mode_t mode, struct dentry *parent, void *data, @@ -36,6 +40,9 @@ struct dentry *debugfs_create_bool(const char *name, mode_t mode, struct dentry *parent, u32 *value); #else + +#include <linux/err.h> + /* * We do not return NULL from these functions if CONFIG_DEBUG_FS is not enabled * so users have a chance to detect if there was a real error or not. We don't @@ -68,21 +75,21 @@ static inline struct dentry *debugfs_create_u8(const char *name, mode_t mode, static inline struct dentry *debugfs_create_u16(const char *name, mode_t mode, struct dentry *parent, - u8 *value) + u16 *value) { return ERR_PTR(-ENODEV); } static inline struct dentry *debugfs_create_u32(const char *name, mode_t mode, struct dentry *parent, - u8 *value) + u32 *value) { return ERR_PTR(-ENODEV); } static inline struct dentry *debugfs_create_bool(const char *name, mode_t mode, struct dentry *parent, - u8 *value) + u32 *value) { return ERR_PTR(-ENODEV); } diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h index 6f502ff7902a..38b58b30814a 100644 --- a/include/linux/sysfs.h +++ b/include/linux/sysfs.h @@ -99,6 +99,9 @@ sysfs_create_file(struct kobject *, const struct attribute *); extern int sysfs_update_file(struct kobject *, const struct attribute *); +extern int +sysfs_chmod_file(struct kobject *kobj, struct attribute *attr, mode_t mode); + extern void sysfs_remove_file(struct kobject *, const struct attribute *); @@ -140,6 +143,10 @@ static inline int sysfs_update_file(struct kobject * k, const struct attribute * { return 0; } +static inline int sysfs_chmod_file(struct kobject *kobj, struct attribute *attr, mode_t mode) +{ + return 0; +} static inline void sysfs_remove_file(struct kobject * k, const struct attribute * a) { |