summaryrefslogtreecommitdiffstats
path: root/kernel/module.c
diff options
context:
space:
mode:
authorRandy Dunlap <randy.dunlap@oracle.com>2007-02-13 15:19:06 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2007-02-16 15:19:18 -0800
commitef665c1a06be719ed9a6b0ad7967137258d9457a (patch)
treeaff01a8a9ae3617fdfd1f2931aa62799f0988610 /kernel/module.c
parente4a3c3f095ecc760fc557ca87e518e2e553fab4b (diff)
downloadblackbird-op-linux-ef665c1a06be719ed9a6b0ad7967137258d9457a.tar.gz
blackbird-op-linux-ef665c1a06be719ed9a6b0ad7967137258d9457a.zip
sysfs: fix build errors: uevent with CONFIG_SYSFS=n
Fix source files to build with CONFIG_SYSFS=n. module_subsys is not available. SYSFS=n, MODULES=y: T:y SYSFS=n, MODULES=n: T:y SYSFS=y, MODULES=y: T:y SYSFS=y, MODULES=n: T:y Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'kernel/module.c')
-rw-r--r--kernel/module.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/kernel/module.c b/kernel/module.c
index e06b77af23fd..8c25b1a04fa6 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -1074,7 +1074,8 @@ static inline void remove_sect_attrs(struct module *mod)
}
#endif /* CONFIG_KALLSYMS */
-static int module_add_modinfo_attrs(struct module *mod)
+#ifdef CONFIG_SYSFS
+int module_add_modinfo_attrs(struct module *mod)
{
struct module_attribute *attr;
struct module_attribute *temp_attr;
@@ -1100,7 +1101,7 @@ static int module_add_modinfo_attrs(struct module *mod)
return error;
}
-static void module_remove_modinfo_attrs(struct module *mod)
+void module_remove_modinfo_attrs(struct module *mod)
{
struct module_attribute *attr;
int i;
@@ -1115,8 +1116,10 @@ static void module_remove_modinfo_attrs(struct module *mod)
}
kfree(mod->modinfo_attrs);
}
+#endif
-static int mod_sysfs_init(struct module *mod)
+#ifdef CONFIG_SYSFS
+int mod_sysfs_init(struct module *mod)
{
int err;
@@ -1139,7 +1142,7 @@ out:
return err;
}
-static int mod_sysfs_setup(struct module *mod,
+int mod_sysfs_setup(struct module *mod,
struct kernel_param *kparam,
unsigned int num_params)
{
@@ -1175,6 +1178,7 @@ out_unreg:
out:
return err;
}
+#endif
static void mod_kobject_remove(struct module *mod)
{
@@ -2348,6 +2352,7 @@ void print_modules(void)
printk("\n");
}
+#ifdef CONFIG_SYSFS
static char *make_driver_name(struct device_driver *drv)
{
char *driver_name;
@@ -2422,6 +2427,7 @@ void module_remove_driver(struct device_driver *drv)
}
}
EXPORT_SYMBOL(module_remove_driver);
+#endif
#ifdef CONFIG_MODVERSIONS
/* Generate the signature for struct module here, too, for modversions. */
OpenPOWER on IntegriCloud