Skip to content

Commit

Permalink
[PATCH] Kobject: possible cleanups
Browse files Browse the repository at this point in the history
This patch contains the following possible cleanups:
- #if 0 the following unused global function:
  - subsys_remove_file()
- remove the following unused EXPORT_SYMBOL's:
  - kset_find_obj
  - subsystem_init
- remove the following unused EXPORT_SYMBOL_GPL:
  - kobject_add_dir

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Adrian Bunk authored and Greg Kroah-Hartman committed Apr 27, 2006
1 parent bde11d7 commit 5b3ef14
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
1 change: 0 additions & 1 deletion include/linux/kobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,6 @@ struct subsys_attribute {
};

extern int subsys_create_file(struct subsystem * , struct subsys_attribute *);
extern void subsys_remove_file(struct subsystem * , struct subsys_attribute *);

#if defined(CONFIG_HOTPLUG)
void kobject_uevent(struct kobject *kobj, enum kobject_action action);
Expand Down
7 changes: 2 additions & 5 deletions lib/kobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,6 @@ struct kobject *kobject_add_dir(struct kobject *parent, const char *name)

return k;
}
EXPORT_SYMBOL_GPL(kobject_add_dir);

/**
* kset_init - initialize a kset for use
Expand Down Expand Up @@ -569,14 +568,15 @@ int subsys_create_file(struct subsystem * s, struct subsys_attribute * a)
* @s: subsystem.
* @a: attribute desciptor.
*/

#if 0
void subsys_remove_file(struct subsystem * s, struct subsys_attribute * a)
{
if (subsys_get(s)) {
sysfs_remove_file(&s->kset.kobj,&a->attr);
subsys_put(s);
}
}
#endif /* 0 */

EXPORT_SYMBOL(kobject_init);
EXPORT_SYMBOL(kobject_register);
Expand All @@ -588,10 +588,7 @@ EXPORT_SYMBOL(kobject_del);

EXPORT_SYMBOL(kset_register);
EXPORT_SYMBOL(kset_unregister);
EXPORT_SYMBOL(kset_find_obj);

EXPORT_SYMBOL(subsystem_init);
EXPORT_SYMBOL(subsystem_register);
EXPORT_SYMBOL(subsystem_unregister);
EXPORT_SYMBOL(subsys_create_file);
EXPORT_SYMBOL(subsys_remove_file);

0 comments on commit 5b3ef14

Please sign in to comment.