aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2010-08-05 14:59:09 -0400
committerRusty Russell <rusty@rustcorp.com.au>2010-08-04 23:29:10 -0400
commit36b0360d17dc3928cc96347a18a3a1cdbb7e506d (patch)
treee963d162006f842a475435988eba04a579114f0d
parent8f6d037815466cb25e7de8f00536eca71d94d4c3 (diff)
module: fix sysfs cleanup for !CONFIG_SYSFS
Restore the stub module_remove_modinfo_attrs, remove the now-unused !CONFIG_SYSFS module_sysfs_init. Also, rename mod_kobject_remove() to mod_sysfs_teardown() as it is the logical counterpart to mod_sysfs_setup now. Reported-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-rw-r--r--kernel/module.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/kernel/module.c b/kernel/module.c
index fd8d46c69766..a64b26cf1879 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -1504,11 +1504,6 @@ static void mod_sysfs_fini(struct module *mod)
1504 1504
1505#else /* !CONFIG_SYSFS */ 1505#else /* !CONFIG_SYSFS */
1506 1506
1507static int mod_sysfs_init(struct module *mod)
1508{
1509 return 0;
1510}
1511
1512static int mod_sysfs_setup(struct module *mod, 1507static int mod_sysfs_setup(struct module *mod,
1513 const struct load_info *info, 1508 const struct load_info *info,
1514 struct kernel_param *kparam, 1509 struct kernel_param *kparam,
@@ -1521,13 +1516,17 @@ static void mod_sysfs_fini(struct module *mod)
1521{ 1516{
1522} 1517}
1523 1518
1519static void module_remove_modinfo_attrs(struct module *mod)
1520{
1521}
1522
1524static void del_usage_links(struct module *mod) 1523static void del_usage_links(struct module *mod)
1525{ 1524{
1526} 1525}
1527 1526
1528#endif /* CONFIG_SYSFS */ 1527#endif /* CONFIG_SYSFS */
1529 1528
1530static void mod_kobject_remove(struct module *mod) 1529static void mod_sysfs_teardown(struct module *mod)
1531{ 1530{
1532 del_usage_links(mod); 1531 del_usage_links(mod);
1533 module_remove_modinfo_attrs(mod); 1532 module_remove_modinfo_attrs(mod);
@@ -1557,7 +1556,7 @@ static void free_module(struct module *mod)
1557 mutex_lock(&module_mutex); 1556 mutex_lock(&module_mutex);
1558 stop_machine(__unlink_module, mod, NULL); 1557 stop_machine(__unlink_module, mod, NULL);
1559 mutex_unlock(&module_mutex); 1558 mutex_unlock(&module_mutex);
1560 mod_kobject_remove(mod); 1559 mod_sysfs_teardown(mod);
1561 1560
1562 /* Remove dynamic debug info */ 1561 /* Remove dynamic debug info */
1563 ddebug_remove_module(mod->name); 1562 ddebug_remove_module(mod->name);