mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-22 22:51:37 +00:00
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>
This commit is contained in:
parent
d0bcb5689a
commit
b402d72cf7
5 changed files with 34 additions and 19 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue