提交 f20a9ead 编写于 作者: A Andrew Morton 提交者: Greg Kroah-Hartman

sysfs: add proper sysfs_init() prototype

Don't be crufty.  Mark it __must_check too.

Cc: "Randy.Dunlap" <rdunlap@xenotime.net>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 f86db396
......@@ -17,6 +17,7 @@
#include <linux/acct.h>
#include <linux/capability.h>
#include <linux/module.h>
#include <linux/sysfs.h>
#include <linux/seq_file.h>
#include <linux/namespace.h>
#include <linux/namei.h>
......@@ -28,15 +29,6 @@
extern int __init init_rootfs(void);
#ifdef CONFIG_SYSFS
extern int __init sysfs_init(void);
#else
static inline int sysfs_init(void)
{
return 0;
}
#endif
/* spinlock for vfsmount related operations, inplace of dcache_lock */
__cacheline_aligned_in_smp DEFINE_SPINLOCK(vfsmount_lock);
......
......@@ -123,6 +123,8 @@ int __must_check sysfs_create_group(struct kobject *,
void sysfs_remove_group(struct kobject *, const struct attribute_group *);
void sysfs_notify(struct kobject * k, char *dir, char *attr);
extern int __must_check sysfs_init(void);
#else /* CONFIG_SYSFS */
static inline int sysfs_create_dir(struct kobject * k)
......@@ -194,6 +196,11 @@ static inline void sysfs_notify(struct kobject * k, char *dir, char *attr)
{
}
static inline int __must_check sysfs_init(void)
{
return 0;
}
#endif /* CONFIG_SYSFS */
#endif /* _SYSFS_H_ */
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册