summaryrefslogtreecommitdiff
path: root/kernel/module.c
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2010-06-05 11:17:36 -0600
committerRusty Russell <rusty@rustcorp.com.au>2010-06-05 11:17:36 +0930
commit6407ebb271fc34440b306f305e1efb7685eece26 (patch)
treedd3fa7484bcaa4499138d2249dbed24f003fdf85 /kernel/module.c
parent80a3d1bb410e000e176931a076cdf19a1e89a955 (diff)
module: Make module sysfs functions private.
These were placed in the header in ef665c1a06 to get the various SYSFS/MODULE config combintations to compile. That may have been necessary then, but it's not now. These functions are all local to module.c. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Cc: Randy Dunlap <randy.dunlap@oracle.com>
Diffstat (limited to 'kernel/module.c')
-rw-r--r--kernel/module.c29
1 files changed, 25 insertions, 4 deletions
diff --git a/kernel/module.c b/kernel/module.c
index c690d988579..808aa18dd66 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -1323,7 +1323,7 @@ static void del_usage_links(struct module *mod)
#endif
}
-int module_add_modinfo_attrs(struct module *mod)
+static int module_add_modinfo_attrs(struct module *mod)
{
struct module_attribute *attr;
struct module_attribute *temp_attr;
@@ -1349,7 +1349,7 @@ int module_add_modinfo_attrs(struct module *mod)
return error;
}
-void module_remove_modinfo_attrs(struct module *mod)
+static void module_remove_modinfo_attrs(struct module *mod)
{
struct module_attribute *attr;
int i;
@@ -1365,7 +1365,7 @@ void module_remove_modinfo_attrs(struct module *mod)
kfree(mod->modinfo_attrs);
}
-int mod_sysfs_init(struct module *mod)
+static int mod_sysfs_init(struct module *mod)
{
int err;
struct kobject *kobj;
@@ -1399,7 +1399,7 @@ out:
return err;
}
-int mod_sysfs_setup(struct module *mod,
+static int mod_sysfs_setup(struct module *mod,
struct kernel_param *kparam,
unsigned int num_params)
{
@@ -1445,6 +1445,27 @@ static void mod_sysfs_fini(struct module *mod)
#else /* CONFIG_SYSFS */
+static inline int mod_sysfs_init(struct module *mod)
+{
+ return 0;
+}
+
+static inline int mod_sysfs_setup(struct module *mod,
+ struct kernel_param *kparam,
+ unsigned int num_params)
+{
+ return 0;
+}
+
+static inline int module_add_modinfo_attrs(struct module *mod)
+{
+ return 0;
+}
+
+static inline void module_remove_modinfo_attrs(struct module *mod)
+{
+}
+
static void mod_sysfs_fini(struct module *mod)
{
}