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>
This commit is contained in:
Andrew Morton
2006-08-14 22:43:23 -07:00
committed by Greg Kroah-Hartman
parent f86db396ff
commit f20a9ead0d
2 changed files with 8 additions and 9 deletions

View File

@ -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_ */