mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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>
This commit is contained in:
parent
80a3d1bb41
commit
6407ebb271
2 changed files with 25 additions and 37 deletions
|
@ -672,43 +672,10 @@ static inline int module_get_iter_tracepoints(struct tracepoint_iter *iter)
|
||||||
|
|
||||||
#endif /* CONFIG_MODULES */
|
#endif /* CONFIG_MODULES */
|
||||||
|
|
||||||
struct device_driver;
|
|
||||||
#ifdef CONFIG_SYSFS
|
#ifdef CONFIG_SYSFS
|
||||||
struct module;
|
|
||||||
|
|
||||||
extern struct kset *module_kset;
|
extern struct kset *module_kset;
|
||||||
extern struct kobj_type module_ktype;
|
extern struct kobj_type module_ktype;
|
||||||
extern int module_sysfs_initialized;
|
extern int module_sysfs_initialized;
|
||||||
|
|
||||||
int mod_sysfs_init(struct module *mod);
|
|
||||||
int mod_sysfs_setup(struct module *mod,
|
|
||||||
struct kernel_param *kparam,
|
|
||||||
unsigned int num_params);
|
|
||||||
int module_add_modinfo_attrs(struct module *mod);
|
|
||||||
void module_remove_modinfo_attrs(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)
|
|
||||||
{ }
|
|
||||||
|
|
||||||
#endif /* CONFIG_SYSFS */
|
#endif /* CONFIG_SYSFS */
|
||||||
|
|
||||||
#define symbol_request(x) try_then_request_module(symbol_get(x), "symbol:" #x)
|
#define symbol_request(x) try_then_request_module(symbol_get(x), "symbol:" #x)
|
||||||
|
|
|
@ -1323,7 +1323,7 @@ static void del_usage_links(struct module *mod)
|
||||||
#endif
|
#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 *attr;
|
||||||
struct module_attribute *temp_attr;
|
struct module_attribute *temp_attr;
|
||||||
|
@ -1349,7 +1349,7 @@ int module_add_modinfo_attrs(struct module *mod)
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
void module_remove_modinfo_attrs(struct module *mod)
|
static void module_remove_modinfo_attrs(struct module *mod)
|
||||||
{
|
{
|
||||||
struct module_attribute *attr;
|
struct module_attribute *attr;
|
||||||
int i;
|
int i;
|
||||||
|
@ -1365,7 +1365,7 @@ void module_remove_modinfo_attrs(struct module *mod)
|
||||||
kfree(mod->modinfo_attrs);
|
kfree(mod->modinfo_attrs);
|
||||||
}
|
}
|
||||||
|
|
||||||
int mod_sysfs_init(struct module *mod)
|
static int mod_sysfs_init(struct module *mod)
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
struct kobject *kobj;
|
struct kobject *kobj;
|
||||||
|
@ -1399,7 +1399,7 @@ out:
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
int mod_sysfs_setup(struct module *mod,
|
static int mod_sysfs_setup(struct module *mod,
|
||||||
struct kernel_param *kparam,
|
struct kernel_param *kparam,
|
||||||
unsigned int num_params)
|
unsigned int num_params)
|
||||||
{
|
{
|
||||||
|
@ -1445,6 +1445,27 @@ static void mod_sysfs_fini(struct module *mod)
|
||||||
|
|
||||||
#else /* CONFIG_SYSFS */
|
#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)
|
static void mod_sysfs_fini(struct module *mod)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue