summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2007-06-14 04:27:21 +0900
committerGreg Kroah-Hartman <gregkh@suse.de>2007-07-11 16:09:08 -0700
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 {
ssize_t (*store)(struct kobject *,struct attribute *,const char *, size_t);
};
+#define SYSFS_TYPE_MASK 0x00ff
#define SYSFS_ROOT 0x0001
#define SYSFS_DIR 0x0002
#define SYSFS_KOBJ_ATTR 0x0004
@@ -82,6 +83,8 @@ struct sysfs_ops {
#define SYSFS_NOT_PINNED (SYSFS_KOBJ_ATTR | SYSFS_KOBJ_BIN_ATTR | SYSFS_KOBJ_LINK)
#define SYSFS_COPY_NAME (SYSFS_DIR | SYSFS_KOBJ_LINK)
+#define SYSFS_FLAG_MASK ~SYSFS_TYPE_MASK
+
#ifdef CONFIG_SYSFS
extern int sysfs_schedule_callback(struct kobject *kobj,