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:
Greg Kroah-Hartman
2007-09-12 15:06:57 -07:00
parent 7e7654a92a
commit 34980ca8fa
6 changed files with 10 additions and 8 deletions

View File

@ -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)