diff options
author | Andrew Morton <akpm@osdl.org> | 2006-08-15 01:43:23 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-09-26 00:08:39 -0400 |
commit | f20a9ead0d005fbeeae3fc21a96f9bf197ac1c1c (patch) | |
tree | b8fb72701b5917d03b6fe122a1719e1cd608b4d9 | |
parent | f86db396ff455ed586751d21816a1ebd431264e5 (diff) |
sysfs: add proper sysfs_init() prototype
Don't be crufty. Mark it __must_check too.
Cc: "Randy.Dunlap" <rdunlap@xenotime.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | fs/namespace.c | 10 | ||||
-rw-r--r-- | include/linux/sysfs.h | 7 |
2 files changed, 8 insertions, 9 deletions
diff --git a/fs/namespace.c b/fs/namespace.c index fa7ed6a9fc2d..36d180858136 100644 --- a/fs/namespace.c +++ b/fs/namespace.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/acct.h> | 17 | #include <linux/acct.h> |
18 | #include <linux/capability.h> | 18 | #include <linux/capability.h> |
19 | #include <linux/module.h> | 19 | #include <linux/module.h> |
20 | #include <linux/sysfs.h> | ||
20 | #include <linux/seq_file.h> | 21 | #include <linux/seq_file.h> |
21 | #include <linux/namespace.h> | 22 | #include <linux/namespace.h> |
22 | #include <linux/namei.h> | 23 | #include <linux/namei.h> |
@@ -28,15 +29,6 @@ | |||
28 | 29 | ||
29 | extern int __init init_rootfs(void); | 30 | extern int __init init_rootfs(void); |
30 | 31 | ||
31 | #ifdef CONFIG_SYSFS | ||
32 | extern int __init sysfs_init(void); | ||
33 | #else | ||
34 | static inline int sysfs_init(void) | ||
35 | { | ||
36 | return 0; | ||
37 | } | ||
38 | #endif | ||
39 | |||
40 | /* spinlock for vfsmount related operations, inplace of dcache_lock */ | 32 | /* spinlock for vfsmount related operations, inplace of dcache_lock */ |
41 | __cacheline_aligned_in_smp DEFINE_SPINLOCK(vfsmount_lock); | 33 | __cacheline_aligned_in_smp DEFINE_SPINLOCK(vfsmount_lock); |
42 | 34 | ||
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h index 02ad790921fd..6d5c43d31dec 100644 --- a/include/linux/sysfs.h +++ b/include/linux/sysfs.h | |||
@@ -123,6 +123,8 @@ int __must_check sysfs_create_group(struct kobject *, | |||
123 | void sysfs_remove_group(struct kobject *, const struct attribute_group *); | 123 | void sysfs_remove_group(struct kobject *, const struct attribute_group *); |
124 | void sysfs_notify(struct kobject * k, char *dir, char *attr); | 124 | void sysfs_notify(struct kobject * k, char *dir, char *attr); |
125 | 125 | ||
126 | extern int __must_check sysfs_init(void); | ||
127 | |||
126 | #else /* CONFIG_SYSFS */ | 128 | #else /* CONFIG_SYSFS */ |
127 | 129 | ||
128 | static inline int sysfs_create_dir(struct kobject * k) | 130 | 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) | |||
194 | { | 196 | { |
195 | } | 197 | } |
196 | 198 | ||
199 | static inline int __must_check sysfs_init(void) | ||
200 | { | ||
201 | return 0; | ||
202 | } | ||
203 | |||
197 | #endif /* CONFIG_SYSFS */ | 204 | #endif /* CONFIG_SYSFS */ |
198 | 205 | ||
199 | #endif /* _SYSFS_H_ */ | 206 | #endif /* _SYSFS_H_ */ |