Commit 3cd60866 authored by Rasmus Villemoes's avatar Rasmus Villemoes Committed by Luis Chamberlain

module: remove redundant module_sysfs_initialized variable

The variable module_sysfs_initialized is used for checking whether
module_kset has been initialized. Checking module_kset itself works
just fine for that.

This is a leftover from commit 7405c1e1 ("kset: convert /sys/module
to use kset_create").
Signed-off-by: default avatarRasmus Villemoes <linux@rasmusvillemoes.dk>
Reviewed-by: default avatarMiroslav Benes <mbenes@suse.cz>
[mcgrof: adjusted commit log as suggested by Christophe Leroy]
Signed-off-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
parent eb037f16
...@@ -827,7 +827,6 @@ void *dereference_module_function_descriptor(struct module *mod, void *ptr) ...@@ -827,7 +827,6 @@ void *dereference_module_function_descriptor(struct module *mod, void *ptr)
#ifdef CONFIG_SYSFS #ifdef CONFIG_SYSFS
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;
#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)
......
...@@ -340,7 +340,7 @@ static int mod_sysfs_init(struct module *mod) ...@@ -340,7 +340,7 @@ static int mod_sysfs_init(struct module *mod)
int err; int err;
struct kobject *kobj; struct kobject *kobj;
if (!module_sysfs_initialized) { if (!module_kset) {
pr_err("%s: module sysfs not initialized\n", mod->name); pr_err("%s: module sysfs not initialized\n", mod->name);
err = -EINVAL; err = -EINVAL;
goto out; goto out;
......
...@@ -940,7 +940,6 @@ static const struct kset_uevent_ops module_uevent_ops = { ...@@ -940,7 +940,6 @@ static const struct kset_uevent_ops module_uevent_ops = {
}; };
struct kset *module_kset; struct kset *module_kset;
int module_sysfs_initialized;
static void module_kobj_release(struct kobject *kobj) static void module_kobj_release(struct kobject *kobj)
{ {
...@@ -964,7 +963,6 @@ static int __init param_sysfs_init(void) ...@@ -964,7 +963,6 @@ static int __init param_sysfs_init(void)
__FILE__, __LINE__); __FILE__, __LINE__);
return -ENOMEM; return -ENOMEM;
} }
module_sysfs_initialized = 1;
version_sysfs_builtin(); version_sysfs_builtin();
param_sysfs_builtin(); param_sysfs_builtin();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment