aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2013-12-11 14:11:56 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-12-11 20:39:20 -0500
commitdf23fc39bce03bb26e63bea57fc5f5bf6882d74b (patch)
tree9317af4854fd05e326a93ac736160fdc56ddbabc /include
parentc525aaddc366df23eb095d58a2bdf11cce62a98b (diff)
kernfs: s/sysfs/kernfs/ in constants
kernfs has just been separated out from sysfs and we're already in full conflict mode. Nothing can make the situation any worse. Let's take the chance to name things properly. This patch performs the following renames. * s/SYSFS_DIR/KERNFS_DIR/ * s/SYSFS_KOBJ_ATTR/KERNFS_FILE/ * s/SYSFS_KOBJ_LINK/KERNFS_LINK/ * s/SYSFS_{TYPE_FLAGS}/KERNFS_{TYPE_FLAGS}/ * s/SYSFS_FLAG_{FLAG}/KERNFS_{FLAG}/ * s/sysfs_type()/kernfs_type()/ * s/SD_DEACTIVATED_BIAS/KN_DEACTIVATED_BIAS/ This patch is strictly rename only and doesn't introduce any functional difference. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/kernfs.h36
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;
28struct kernfs_iattrs; 28struct kernfs_iattrs;
29 29
30enum kernfs_node_type { 30enum 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
41enum kernfs_node_flag { 41enum 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
173static inline enum kernfs_node_type sysfs_type(struct kernfs_node *kn) 173static 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 */
186static inline void kernfs_enable_ns(struct kernfs_node *kn) 186static 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 */
199static inline bool kernfs_ns_enabled(struct kernfs_node *kn) 199static 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
204struct kernfs_node *kernfs_find_and_get_ns(struct kernfs_node *parent, 204struct 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
241static inline enum kernfs_node_type sysfs_type(struct kernfs_node *kn) 241static inline enum kernfs_node_type kernfs_type(struct kernfs_node *kn)
242{ return 0; } /* whatever */ 242{ return 0; } /* whatever */
243 243
244static inline void kernfs_enable_ns(struct kernfs_node *kn) { } 244static inline void kernfs_enable_ns(struct kernfs_node *kn) { }