diff options
Diffstat (limited to 'include/linux/kernfs.h')
-rw-r--r-- | include/linux/kernfs.h | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/include/linux/kernfs.h b/include/linux/kernfs.h index 757647c4cb3b..e9c4e3a03960 100644 --- a/include/linux/kernfs.h +++ b/include/linux/kernfs.h | |||
@@ -28,22 +28,22 @@ struct kernfs_open_node; | |||
28 | struct kernfs_iattrs; | 28 | struct kernfs_iattrs; |
29 | 29 | ||
30 | enum kernfs_node_type { | 30 | enum kernfs_node_type { |
31 | SYSFS_DIR = 0x0001, | 31 | KERNFS_DIR = 0x0001, |
32 | SYSFS_KOBJ_ATTR = 0x0002, | 32 | KERNFS_FILE = 0x0002, |
33 | SYSFS_KOBJ_LINK = 0x0004, | 33 | KERNFS_LINK = 0x0004, |
34 | }; | 34 | }; |
35 | 35 | ||
36 | #define SYSFS_TYPE_MASK 0x000f | 36 | #define KERNFS_TYPE_MASK 0x000f |
37 | #define SYSFS_COPY_NAME (SYSFS_DIR | SYSFS_KOBJ_LINK) | 37 | #define KERNFS_COPY_NAME (KERNFS_DIR | KERNFS_LINK) |
38 | #define SYSFS_ACTIVE_REF SYSFS_KOBJ_ATTR | 38 | #define KERNFS_ACTIVE_REF KERNFS_FILE |
39 | #define SYSFS_FLAG_MASK ~SYSFS_TYPE_MASK | 39 | #define KERNFS_FLAG_MASK ~KERNFS_TYPE_MASK |
40 | 40 | ||
41 | enum kernfs_node_flag { | 41 | enum kernfs_node_flag { |
42 | SYSFS_FLAG_REMOVED = 0x0010, | 42 | KERNFS_REMOVED = 0x0010, |
43 | SYSFS_FLAG_NS = 0x0020, | 43 | KERNFS_NS = 0x0020, |
44 | SYSFS_FLAG_HAS_SEQ_SHOW = 0x0040, | 44 | KERNFS_HAS_SEQ_SHOW = 0x0040, |
45 | SYSFS_FLAG_HAS_MMAP = 0x0080, | 45 | KERNFS_HAS_MMAP = 0x0080, |
46 | SYSFS_FLAG_LOCKDEP = 0x0100, | 46 | KERNFS_LOCKDEP = 0x0100, |
47 | }; | 47 | }; |
48 | 48 | ||
49 | /* type-specific structures for kernfs_node union members */ | 49 | /* type-specific structures for kernfs_node union members */ |
@@ -170,9 +170,9 @@ struct kernfs_ops { | |||
170 | 170 | ||
171 | #ifdef CONFIG_SYSFS | 171 | #ifdef CONFIG_SYSFS |
172 | 172 | ||
173 | static inline enum kernfs_node_type sysfs_type(struct kernfs_node *kn) | 173 | static inline enum kernfs_node_type kernfs_type(struct kernfs_node *kn) |
174 | { | 174 | { |
175 | return kn->flags & SYSFS_TYPE_MASK; | 175 | return kn->flags & KERNFS_TYPE_MASK; |
176 | } | 176 | } |
177 | 177 | ||
178 | /** | 178 | /** |
@@ -185,9 +185,9 @@ static inline enum kernfs_node_type sysfs_type(struct kernfs_node *kn) | |||
185 | */ | 185 | */ |
186 | static inline void kernfs_enable_ns(struct kernfs_node *kn) | 186 | static inline void kernfs_enable_ns(struct kernfs_node *kn) |
187 | { | 187 | { |
188 | WARN_ON_ONCE(sysfs_type(kn) != SYSFS_DIR); | 188 | WARN_ON_ONCE(kernfs_type(kn) != KERNFS_DIR); |
189 | WARN_ON_ONCE(!RB_EMPTY_ROOT(&kn->dir.children)); | 189 | WARN_ON_ONCE(!RB_EMPTY_ROOT(&kn->dir.children)); |
190 | kn->flags |= SYSFS_FLAG_NS; | 190 | kn->flags |= KERNFS_NS; |
191 | } | 191 | } |
192 | 192 | ||
193 | /** | 193 | /** |
@@ -198,7 +198,7 @@ static inline void kernfs_enable_ns(struct kernfs_node *kn) | |||
198 | */ | 198 | */ |
199 | static inline bool kernfs_ns_enabled(struct kernfs_node *kn) | 199 | static inline bool kernfs_ns_enabled(struct kernfs_node *kn) |
200 | { | 200 | { |
201 | return kn->flags & SYSFS_FLAG_NS; | 201 | return kn->flags & KERNFS_NS; |
202 | } | 202 | } |
203 | 203 | ||
204 | struct kernfs_node *kernfs_find_and_get_ns(struct kernfs_node *parent, | 204 | struct kernfs_node *kernfs_find_and_get_ns(struct kernfs_node *parent, |
@@ -238,7 +238,7 @@ void kernfs_init(void); | |||
238 | 238 | ||
239 | #else /* CONFIG_SYSFS */ | 239 | #else /* CONFIG_SYSFS */ |
240 | 240 | ||
241 | static inline enum kernfs_node_type sysfs_type(struct kernfs_node *kn) | 241 | static inline enum kernfs_node_type kernfs_type(struct kernfs_node *kn) |
242 | { return 0; } /* whatever */ | 242 | { return 0; } /* whatever */ |
243 | 243 | ||
244 | static inline void kernfs_enable_ns(struct kernfs_node *kn) { } | 244 | static inline void kernfs_enable_ns(struct kernfs_node *kn) { } |