aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-04-01 19:28:19 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-04-01 19:28:19 -0400
commit158e0d3621683ee0cdfeeba56f0e5ddd97ae984f (patch)
treecc59e84001f0a496a681242a875ecad6463aa50e /include/linux
parent675c354a95d5375153b8bb80a0448cab916c7991 (diff)
parent72099304eeb316c4b00df3ae83efe4375729bd78 (diff)
Merge tag 'driver-core-3.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
Pull driver core and sysfs updates from Greg KH: "Here's the big driver core / sysfs update for 3.15-rc1. Lots of kernfs updates to make it useful for other subsystems, and a few other tiny driver core patches. All have been in linux-next for a while" * tag 'driver-core-3.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (42 commits) Revert "sysfs, driver-core: remove unused {sysfs|device}_schedule_callback_owner()" kernfs: cache atomic_write_len in kernfs_open_file numa: fix NULL pointer access and memory leak in unregister_one_node() Revert "driver core: synchronize device shutdown" kernfs: fix off by one error. kernfs: remove duplicate dir.c at the top dir x86: align x86 arch with generic CPU modalias handling cpu: add generic support for CPU feature based module autoloading sysfs: create bin_attributes under the requested group driver core: unexport static function create_syslog_header firmware: use power efficient workqueue for unloading and aborting fw load firmware: give a protection when map page failed firmware: google memconsole driver fixes firmware: fix google/gsmi duplicate efivars_sysfs_init() drivers/base: delete non-required instances of include <linux/init.h> kernfs: fix kernfs_node_from_dentry() ACPI / platform: drop redundant ACPI_HANDLE check kernfs: fix hash calculation in kernfs_rename_ns() kernfs: add CONFIG_KERNFS sysfs, kobject: add sysfs wrapper for kernfs_enable_ns() ...
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/cpu.h7
-rw-r--r--include/linux/cpufeature.h60
-rw-r--r--include/linux/device.h2
-rw-r--r--include/linux/kernfs.h109
-rw-r--r--include/linux/mod_devicetable.h9
-rw-r--r--include/linux/sysfs.h16
6 files changed, 173 insertions, 30 deletions
diff --git a/include/linux/cpu.h b/include/linux/cpu.h
index 03e235ad1bba..03e962e23eaf 100644
--- a/include/linux/cpu.h
+++ b/include/linux/cpu.h
@@ -46,13 +46,6 @@ extern ssize_t arch_cpu_release(const char *, size_t);
46#endif 46#endif
47struct notifier_block; 47struct notifier_block;
48 48
49#ifdef CONFIG_ARCH_HAS_CPU_AUTOPROBE
50extern int arch_cpu_uevent(struct device *dev, struct kobj_uevent_env *env);
51extern ssize_t arch_print_cpu_modalias(struct device *dev,
52 struct device_attribute *attr,
53 char *bufptr);
54#endif
55
56/* 49/*
57 * CPU notifier priorities. 50 * CPU notifier priorities.
58 */ 51 */
diff --git a/include/linux/cpufeature.h b/include/linux/cpufeature.h
new file mode 100644
index 000000000000..c4d4eb8ac9fe
--- /dev/null
+++ b/include/linux/cpufeature.h
@@ -0,0 +1,60 @@
1/*
2 * Copyright (C) 2014 Linaro Ltd. <ard.biesheuvel@linaro.org>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 */
8
9#ifndef __LINUX_CPUFEATURE_H
10#define __LINUX_CPUFEATURE_H
11
12#ifdef CONFIG_GENERIC_CPU_AUTOPROBE
13
14#include <linux/mod_devicetable.h>
15#include <asm/cpufeature.h>
16
17/*
18 * Macros imported from <asm/cpufeature.h>:
19 * - cpu_feature(x) ordinal value of feature called 'x'
20 * - cpu_have_feature(u32 n) whether feature #n is available
21 * - MAX_CPU_FEATURES upper bound for feature ordinal values
22 * Optional:
23 * - CPU_FEATURE_TYPEFMT format string fragment for printing the cpu type
24 * - CPU_FEATURE_TYPEVAL set of values matching the format string above
25 */
26
27#ifndef CPU_FEATURE_TYPEFMT
28#define CPU_FEATURE_TYPEFMT "%s"
29#endif
30
31#ifndef CPU_FEATURE_TYPEVAL
32#define CPU_FEATURE_TYPEVAL ELF_PLATFORM
33#endif
34
35/*
36 * Use module_cpu_feature_match(feature, module_init_function) to
37 * declare that
38 * a) the module shall be probed upon discovery of CPU feature 'feature'
39 * (typically at boot time using udev)
40 * b) the module must not be loaded if CPU feature 'feature' is not present
41 * (not even by manual insmod).
42 *
43 * For a list of legal values for 'feature', please consult the file
44 * 'asm/cpufeature.h' of your favorite architecture.
45 */
46#define module_cpu_feature_match(x, __init) \
47static struct cpu_feature const cpu_feature_match_ ## x[] = \
48 { { .feature = cpu_feature(x) }, { } }; \
49MODULE_DEVICE_TABLE(cpu, cpu_feature_match_ ## x); \
50 \
51static int cpu_feature_match_ ## x ## _init(void) \
52{ \
53 if (!cpu_have_feature(cpu_feature(x))) \
54 return -ENODEV; \
55 return __init(); \
56} \
57module_init(cpu_feature_match_ ## x ## _init)
58
59#endif
60#endif
diff --git a/include/linux/device.h b/include/linux/device.h
index ec1b6e21f0ef..233bbbeb768d 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -560,6 +560,8 @@ extern int device_create_file(struct device *device,
560 const struct device_attribute *entry); 560 const struct device_attribute *entry);
561extern void device_remove_file(struct device *dev, 561extern void device_remove_file(struct device *dev,
562 const struct device_attribute *attr); 562 const struct device_attribute *attr);
563extern bool device_remove_file_self(struct device *dev,
564 const struct device_attribute *attr);
563extern int __must_check device_create_bin_file(struct device *dev, 565extern int __must_check device_create_bin_file(struct device *dev,
564 const struct bin_attribute *attr); 566 const struct bin_attribute *attr);
565extern void device_remove_bin_file(struct device *dev, 567extern void device_remove_bin_file(struct device *dev,
diff --git a/include/linux/kernfs.h b/include/linux/kernfs.h
index d267623c28cf..b0122dc6f96a 100644
--- a/include/linux/kernfs.h
+++ b/include/linux/kernfs.h
@@ -15,7 +15,7 @@
15#include <linux/lockdep.h> 15#include <linux/lockdep.h>
16#include <linux/rbtree.h> 16#include <linux/rbtree.h>
17#include <linux/atomic.h> 17#include <linux/atomic.h>
18#include <linux/completion.h> 18#include <linux/wait.h>
19 19
20struct file; 20struct file;
21struct dentry; 21struct dentry;
@@ -35,16 +35,22 @@ enum kernfs_node_type {
35}; 35};
36 36
37#define KERNFS_TYPE_MASK 0x000f 37#define KERNFS_TYPE_MASK 0x000f
38#define KERNFS_ACTIVE_REF KERNFS_FILE
39#define KERNFS_FLAG_MASK ~KERNFS_TYPE_MASK 38#define KERNFS_FLAG_MASK ~KERNFS_TYPE_MASK
40 39
41enum kernfs_node_flag { 40enum kernfs_node_flag {
42 KERNFS_REMOVED = 0x0010, 41 KERNFS_ACTIVATED = 0x0010,
43 KERNFS_NS = 0x0020, 42 KERNFS_NS = 0x0020,
44 KERNFS_HAS_SEQ_SHOW = 0x0040, 43 KERNFS_HAS_SEQ_SHOW = 0x0040,
45 KERNFS_HAS_MMAP = 0x0080, 44 KERNFS_HAS_MMAP = 0x0080,
46 KERNFS_LOCKDEP = 0x0100, 45 KERNFS_LOCKDEP = 0x0100,
47 KERNFS_STATIC_NAME = 0x0200, 46 KERNFS_STATIC_NAME = 0x0200,
47 KERNFS_SUICIDAL = 0x0400,
48 KERNFS_SUICIDED = 0x0800,
49};
50
51/* @flags for kernfs_create_root() */
52enum kernfs_root_flag {
53 KERNFS_ROOT_CREATE_DEACTIVATED = 0x0001,
48}; 54};
49 55
50/* type-specific structures for kernfs_node union members */ 56/* type-specific structures for kernfs_node union members */
@@ -85,17 +91,17 @@ struct kernfs_node {
85#ifdef CONFIG_DEBUG_LOCK_ALLOC 91#ifdef CONFIG_DEBUG_LOCK_ALLOC
86 struct lockdep_map dep_map; 92 struct lockdep_map dep_map;
87#endif 93#endif
88 /* the following two fields are published */ 94 /*
95 * Use kernfs_get_parent() and kernfs_name/path() instead of
96 * accessing the following two fields directly. If the node is
97 * never moved to a different parent, it is safe to access the
98 * parent directly.
99 */
89 struct kernfs_node *parent; 100 struct kernfs_node *parent;
90 const char *name; 101 const char *name;
91 102
92 struct rb_node rb; 103 struct rb_node rb;
93 104
94 union {
95 struct completion *completion;
96 struct kernfs_node *removed_list;
97 } u;
98
99 const void *ns; /* namespace tag */ 105 const void *ns; /* namespace tag */
100 unsigned int hash; /* ns + name hash */ 106 unsigned int hash; /* ns + name hash */
101 union { 107 union {
@@ -113,12 +119,16 @@ struct kernfs_node {
113}; 119};
114 120
115/* 121/*
116 * kernfs_dir_ops may be specified on kernfs_create_root() to support 122 * kernfs_syscall_ops may be specified on kernfs_create_root() to support
117 * directory manipulation syscalls. These optional callbacks are invoked 123 * syscalls. These optional callbacks are invoked on the matching syscalls
118 * on the matching syscalls and can perform any kernfs operations which 124 * and can perform any kernfs operations which don't necessarily have to be
119 * don't necessarily have to be the exact operation requested. 125 * the exact operation requested. An active reference is held for each
126 * kernfs_node parameter.
120 */ 127 */
121struct kernfs_dir_ops { 128struct kernfs_syscall_ops {
129 int (*remount_fs)(struct kernfs_root *root, int *flags, char *data);
130 int (*show_options)(struct seq_file *sf, struct kernfs_root *root);
131
122 int (*mkdir)(struct kernfs_node *parent, const char *name, 132 int (*mkdir)(struct kernfs_node *parent, const char *name,
123 umode_t mode); 133 umode_t mode);
124 int (*rmdir)(struct kernfs_node *kn); 134 int (*rmdir)(struct kernfs_node *kn);
@@ -129,22 +139,26 @@ struct kernfs_dir_ops {
129struct kernfs_root { 139struct kernfs_root {
130 /* published fields */ 140 /* published fields */
131 struct kernfs_node *kn; 141 struct kernfs_node *kn;
142 unsigned int flags; /* KERNFS_ROOT_* flags */
132 143
133 /* private fields, do not use outside kernfs proper */ 144 /* private fields, do not use outside kernfs proper */
134 struct ida ino_ida; 145 struct ida ino_ida;
135 struct kernfs_dir_ops *dir_ops; 146 struct kernfs_syscall_ops *syscall_ops;
147 wait_queue_head_t deactivate_waitq;
136}; 148};
137 149
138struct kernfs_open_file { 150struct kernfs_open_file {
139 /* published fields */ 151 /* published fields */
140 struct kernfs_node *kn; 152 struct kernfs_node *kn;
141 struct file *file; 153 struct file *file;
154 void *priv;
142 155
143 /* private fields, do not use outside kernfs proper */ 156 /* private fields, do not use outside kernfs proper */
144 struct mutex mutex; 157 struct mutex mutex;
145 int event; 158 int event;
146 struct list_head list; 159 struct list_head list;
147 160
161 size_t atomic_write_len;
148 bool mmapped; 162 bool mmapped;
149 const struct vm_operations_struct *vm_ops; 163 const struct vm_operations_struct *vm_ops;
150}; 164};
@@ -171,9 +185,13 @@ struct kernfs_ops {
171 loff_t off); 185 loff_t off);
172 186
173 /* 187 /*
174 * write() is bounced through kernel buffer and a write larger than 188 * write() is bounced through kernel buffer. If atomic_write_len
175 * PAGE_SIZE results in partial operation of PAGE_SIZE. 189 * is not set, a write larger than PAGE_SIZE results in partial
190 * operations of PAGE_SIZE chunks. If atomic_write_len is set,
191 * writes upto the specified size are executed atomically but
192 * larger ones are rejected with -E2BIG.
176 */ 193 */
194 size_t atomic_write_len;
177 ssize_t (*write)(struct kernfs_open_file *of, char *buf, size_t bytes, 195 ssize_t (*write)(struct kernfs_open_file *of, char *buf, size_t bytes,
178 loff_t off); 196 loff_t off);
179 197
@@ -184,7 +202,7 @@ struct kernfs_ops {
184#endif 202#endif
185}; 203};
186 204
187#ifdef CONFIG_SYSFS 205#ifdef CONFIG_KERNFS
188 206
189static inline enum kernfs_node_type kernfs_type(struct kernfs_node *kn) 207static inline enum kernfs_node_type kernfs_type(struct kernfs_node *kn)
190{ 208{
@@ -217,13 +235,22 @@ static inline bool kernfs_ns_enabled(struct kernfs_node *kn)
217 return kn->flags & KERNFS_NS; 235 return kn->flags & KERNFS_NS;
218} 236}
219 237
238int kernfs_name(struct kernfs_node *kn, char *buf, size_t buflen);
239char * __must_check kernfs_path(struct kernfs_node *kn, char *buf,
240 size_t buflen);
241void pr_cont_kernfs_name(struct kernfs_node *kn);
242void pr_cont_kernfs_path(struct kernfs_node *kn);
243struct kernfs_node *kernfs_get_parent(struct kernfs_node *kn);
220struct kernfs_node *kernfs_find_and_get_ns(struct kernfs_node *parent, 244struct kernfs_node *kernfs_find_and_get_ns(struct kernfs_node *parent,
221 const char *name, const void *ns); 245 const char *name, const void *ns);
222void kernfs_get(struct kernfs_node *kn); 246void kernfs_get(struct kernfs_node *kn);
223void kernfs_put(struct kernfs_node *kn); 247void kernfs_put(struct kernfs_node *kn);
224 248
225struct kernfs_root *kernfs_create_root(struct kernfs_dir_ops *kdops, 249struct kernfs_node *kernfs_node_from_dentry(struct dentry *dentry);
226 void *priv); 250struct kernfs_root *kernfs_root_from_sb(struct super_block *sb);
251
252struct kernfs_root *kernfs_create_root(struct kernfs_syscall_ops *scops,
253 unsigned int flags, void *priv);
227void kernfs_destroy_root(struct kernfs_root *root); 254void kernfs_destroy_root(struct kernfs_root *root);
228 255
229struct kernfs_node *kernfs_create_dir_ns(struct kernfs_node *parent, 256struct kernfs_node *kernfs_create_dir_ns(struct kernfs_node *parent,
@@ -239,7 +266,11 @@ struct kernfs_node *__kernfs_create_file(struct kernfs_node *parent,
239struct kernfs_node *kernfs_create_link(struct kernfs_node *parent, 266struct kernfs_node *kernfs_create_link(struct kernfs_node *parent,
240 const char *name, 267 const char *name,
241 struct kernfs_node *target); 268 struct kernfs_node *target);
269void kernfs_activate(struct kernfs_node *kn);
242void kernfs_remove(struct kernfs_node *kn); 270void kernfs_remove(struct kernfs_node *kn);
271void kernfs_break_active_protection(struct kernfs_node *kn);
272void kernfs_unbreak_active_protection(struct kernfs_node *kn);
273bool kernfs_remove_self(struct kernfs_node *kn);
243int kernfs_remove_by_name_ns(struct kernfs_node *parent, const char *name, 274int kernfs_remove_by_name_ns(struct kernfs_node *parent, const char *name,
244 const void *ns); 275 const void *ns);
245int kernfs_rename_ns(struct kernfs_node *kn, struct kernfs_node *new_parent, 276int kernfs_rename_ns(struct kernfs_node *kn, struct kernfs_node *new_parent,
@@ -255,7 +286,7 @@ void kernfs_kill_sb(struct super_block *sb);
255 286
256void kernfs_init(void); 287void kernfs_init(void);
257 288
258#else /* CONFIG_SYSFS */ 289#else /* CONFIG_KERNFS */
259 290
260static inline enum kernfs_node_type kernfs_type(struct kernfs_node *kn) 291static inline enum kernfs_node_type kernfs_type(struct kernfs_node *kn)
261{ return 0; } /* whatever */ 292{ return 0; } /* whatever */
@@ -265,6 +296,19 @@ static inline void kernfs_enable_ns(struct kernfs_node *kn) { }
265static inline bool kernfs_ns_enabled(struct kernfs_node *kn) 296static inline bool kernfs_ns_enabled(struct kernfs_node *kn)
266{ return false; } 297{ return false; }
267 298
299static inline int kernfs_name(struct kernfs_node *kn, char *buf, size_t buflen)
300{ return -ENOSYS; }
301
302static inline char * __must_check kernfs_path(struct kernfs_node *kn, char *buf,
303 size_t buflen)
304{ return NULL; }
305
306static inline void pr_cont_kernfs_name(struct kernfs_node *kn) { }
307static inline void pr_cont_kernfs_path(struct kernfs_node *kn) { }
308
309static inline struct kernfs_node *kernfs_get_parent(struct kernfs_node *kn)
310{ return NULL; }
311
268static inline struct kernfs_node * 312static inline struct kernfs_node *
269kernfs_find_and_get_ns(struct kernfs_node *parent, const char *name, 313kernfs_find_and_get_ns(struct kernfs_node *parent, const char *name,
270 const void *ns) 314 const void *ns)
@@ -273,8 +317,15 @@ kernfs_find_and_get_ns(struct kernfs_node *parent, const char *name,
273static inline void kernfs_get(struct kernfs_node *kn) { } 317static inline void kernfs_get(struct kernfs_node *kn) { }
274static inline void kernfs_put(struct kernfs_node *kn) { } 318static inline void kernfs_put(struct kernfs_node *kn) { }
275 319
320static inline struct kernfs_node *kernfs_node_from_dentry(struct dentry *dentry)
321{ return NULL; }
322
323static inline struct kernfs_root *kernfs_root_from_sb(struct super_block *sb)
324{ return NULL; }
325
276static inline struct kernfs_root * 326static inline struct kernfs_root *
277kernfs_create_root(struct kernfs_dir_ops *kdops, void *priv) 327kernfs_create_root(struct kernfs_syscall_ops *scops, unsigned int flags,
328 void *priv)
278{ return ERR_PTR(-ENOSYS); } 329{ return ERR_PTR(-ENOSYS); }
279 330
280static inline void kernfs_destroy_root(struct kernfs_root *root) { } 331static inline void kernfs_destroy_root(struct kernfs_root *root) { }
@@ -296,8 +347,13 @@ kernfs_create_link(struct kernfs_node *parent, const char *name,
296 struct kernfs_node *target) 347 struct kernfs_node *target)
297{ return ERR_PTR(-ENOSYS); } 348{ return ERR_PTR(-ENOSYS); }
298 349
350static inline void kernfs_activate(struct kernfs_node *kn) { }
351
299static inline void kernfs_remove(struct kernfs_node *kn) { } 352static inline void kernfs_remove(struct kernfs_node *kn) { }
300 353
354static inline bool kernfs_remove_self(struct kernfs_node *kn)
355{ return false; }
356
301static inline int kernfs_remove_by_name_ns(struct kernfs_node *kn, 357static inline int kernfs_remove_by_name_ns(struct kernfs_node *kn,
302 const char *name, const void *ns) 358 const char *name, const void *ns)
303{ return -ENOSYS; } 359{ return -ENOSYS; }
@@ -325,7 +381,7 @@ static inline void kernfs_kill_sb(struct super_block *sb) { }
325 381
326static inline void kernfs_init(void) { } 382static inline void kernfs_init(void) { }
327 383
328#endif /* CONFIG_SYSFS */ 384#endif /* CONFIG_KERNFS */
329 385
330static inline struct kernfs_node * 386static inline struct kernfs_node *
331kernfs_find_and_get(struct kernfs_node *kn, const char *name) 387kernfs_find_and_get(struct kernfs_node *kn, const char *name)
@@ -367,6 +423,13 @@ static inline int kernfs_remove_by_name(struct kernfs_node *parent,
367 return kernfs_remove_by_name_ns(parent, name, NULL); 423 return kernfs_remove_by_name_ns(parent, name, NULL);
368} 424}
369 425
426static inline int kernfs_rename(struct kernfs_node *kn,
427 struct kernfs_node *new_parent,
428 const char *new_name)
429{
430 return kernfs_rename_ns(kn, new_parent, new_name, NULL);
431}
432
370static inline struct dentry * 433static inline struct dentry *
371kernfs_mount(struct file_system_type *fs_type, int flags, 434kernfs_mount(struct file_system_type *fs_type, int flags,
372 struct kernfs_root *root, bool *new_sb_created) 435 struct kernfs_root *root, bool *new_sb_created)
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h
index 50f67eff27ef..9a165a213d93 100644
--- a/include/linux/mod_devicetable.h
+++ b/include/linux/mod_devicetable.h
@@ -572,6 +572,15 @@ struct x86_cpu_id {
572#define X86_MODEL_ANY 0 572#define X86_MODEL_ANY 0
573#define X86_FEATURE_ANY 0 /* Same as FPU, you can't test for that */ 573#define X86_FEATURE_ANY 0 /* Same as FPU, you can't test for that */
574 574
575/*
576 * Generic table type for matching CPU features.
577 * @feature: the bit number of the feature (0 - 65535)
578 */
579
580struct cpu_feature {
581 __u16 feature;
582};
583
575#define IPACK_ANY_FORMAT 0xff 584#define IPACK_ANY_FORMAT 0xff
576#define IPACK_ANY_ID (~0) 585#define IPACK_ANY_ID (~0)
577struct ipack_device_id { 586struct ipack_device_id {
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h
index 30b2ebee6439..e0bf210ddffd 100644
--- a/include/linux/sysfs.h
+++ b/include/linux/sysfs.h
@@ -198,6 +198,7 @@ int __must_check sysfs_chmod_file(struct kobject *kobj,
198 const struct attribute *attr, umode_t mode); 198 const struct attribute *attr, umode_t mode);
199void sysfs_remove_file_ns(struct kobject *kobj, const struct attribute *attr, 199void sysfs_remove_file_ns(struct kobject *kobj, const struct attribute *attr,
200 const void *ns); 200 const void *ns);
201bool sysfs_remove_file_self(struct kobject *kobj, const struct attribute *attr);
201void sysfs_remove_files(struct kobject *kobj, const struct attribute **attr); 202void sysfs_remove_files(struct kobject *kobj, const struct attribute **attr);
202 203
203int __must_check sysfs_create_bin_file(struct kobject *kobj, 204int __must_check sysfs_create_bin_file(struct kobject *kobj,
@@ -246,6 +247,11 @@ void sysfs_notify(struct kobject *kobj, const char *dir, const char *attr);
246 247
247int __must_check sysfs_init(void); 248int __must_check sysfs_init(void);
248 249
250static inline void sysfs_enable_ns(struct kernfs_node *kn)
251{
252 return kernfs_enable_ns(kn);
253}
254
249#else /* CONFIG_SYSFS */ 255#else /* CONFIG_SYSFS */
250 256
251static inline int sysfs_schedule_callback(struct kobject *kobj, 257static inline int sysfs_schedule_callback(struct kobject *kobj,
@@ -301,6 +307,12 @@ static inline void sysfs_remove_file_ns(struct kobject *kobj,
301{ 307{
302} 308}
303 309
310static inline bool sysfs_remove_file_self(struct kobject *kobj,
311 const struct attribute *attr)
312{
313 return false;
314}
315
304static inline void sysfs_remove_files(struct kobject *kobj, 316static inline void sysfs_remove_files(struct kobject *kobj,
305 const struct attribute **attr) 317 const struct attribute **attr)
306{ 318{
@@ -418,6 +430,10 @@ static inline int __must_check sysfs_init(void)
418 return 0; 430 return 0;
419} 431}
420 432
433static inline void sysfs_enable_ns(struct kernfs_node *kn)
434{
435}
436
421#endif /* CONFIG_SYSFS */ 437#endif /* CONFIG_SYSFS */
422 438
423static inline int __must_check sysfs_create_file(struct kobject *kobj, 439static inline int __must_check sysfs_create_file(struct kobject *kobj,