Drivers: clean up direct setting of the name of a kset
A kset should not have its name set directly, so dynamically set the name at runtime. This is needed to remove the static array in the kobject structure which will be changed in a future patch. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
@ -190,7 +190,6 @@ static struct kobj_type gdlm_ktype = {
|
||||
};
|
||||
|
||||
static struct kset gdlm_kset = {
|
||||
.kobj = {.name = "lock_dlm",},
|
||||
.ktype = &gdlm_ktype,
|
||||
};
|
||||
|
||||
@ -224,6 +223,7 @@ int gdlm_sysfs_init(void)
|
||||
{
|
||||
int error;
|
||||
|
||||
kobject_set_name(&gdlm_kset.kobj, "lock_dlm");
|
||||
kobj_set_kset_s(&gdlm_kset, kernel_subsys);
|
||||
error = kset_register(&gdlm_kset);
|
||||
if (error)
|
||||
|
Reference in New Issue
Block a user