aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2007-06-13 15:27:21 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2007-07-11 19:09:08 -0400
commitb402d72cf7b338a074e3c12b305ec79284e18845 (patch)
tree0724d40180eb78212be81c7ff2d909ec3fb3f306 /include
parentd0bcb5689a521df98bff7549fcb8b17499660a99 (diff)
sysfs: rename sysfs_dirent->s_type to s_flags and make room for flags
Rename sysfs_dirent->s_type to s_flags, pack type into lower eight bits and reserve the rest for flags. sysfs_type() can used to access the type. All existing sd->s_type accesses are converted to use sysfs_type(). While at it, type test is changed to equality test instead of bit-and test where appropriate. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include')
-rw-r--r--include/linux/sysfs.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h
index 161e19aa2b4f..58135509023e 100644
--- a/include/linux/sysfs.h
+++ b/include/linux/sysfs.h
@@ -74,6 +74,7 @@ struct sysfs_ops {
74 ssize_t (*store)(struct kobject *,struct attribute *,const char *, size_t); 74 ssize_t (*store)(struct kobject *,struct attribute *,const char *, size_t);
75}; 75};
76 76
77#define SYSFS_TYPE_MASK 0x00ff
77#define SYSFS_ROOT 0x0001 78#define SYSFS_ROOT 0x0001
78#define SYSFS_DIR 0x0002 79#define SYSFS_DIR 0x0002
79#define SYSFS_KOBJ_ATTR 0x0004 80#define SYSFS_KOBJ_ATTR 0x0004
@@ -82,6 +83,8 @@ struct sysfs_ops {
82#define SYSFS_NOT_PINNED (SYSFS_KOBJ_ATTR | SYSFS_KOBJ_BIN_ATTR | SYSFS_KOBJ_LINK) 83#define SYSFS_NOT_PINNED (SYSFS_KOBJ_ATTR | SYSFS_KOBJ_BIN_ATTR | SYSFS_KOBJ_LINK)
83#define SYSFS_COPY_NAME (SYSFS_DIR | SYSFS_KOBJ_LINK) 84#define SYSFS_COPY_NAME (SYSFS_DIR | SYSFS_KOBJ_LINK)
84 85
86#define SYSFS_FLAG_MASK ~SYSFS_TYPE_MASK
87
85#ifdef CONFIG_SYSFS 88#ifdef CONFIG_SYSFS
86 89
87extern int sysfs_schedule_callback(struct kobject *kobj, 90extern int sysfs_schedule_callback(struct kobject *kobj,