aboutsummaryrefslogtreecommitdiff
path: root/drivers/edac/edac_mc_sysfs.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2007-09-12 15:06:57 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2007-10-12 14:51:02 -0700
commit34980ca8faebfcce31094eba6ffbb0113950361f (patch)
tree1339b5a059fdc34e688d5571749577e8f3f96f09 /drivers/edac/edac_mc_sysfs.c
parent7e7654a92a5a75a350cc3458389bc76273498f6a (diff)
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>
Diffstat (limited to 'drivers/edac/edac_mc_sysfs.c')
-rw-r--r--drivers/edac/edac_mc_sysfs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/edac/edac_mc_sysfs.c b/drivers/edac/edac_mc_sysfs.c
index 4a0576bd06f..3706b2bc098 100644
--- a/drivers/edac/edac_mc_sysfs.c
+++ b/drivers/edac/edac_mc_sysfs.c
@@ -743,7 +743,7 @@ static struct kobj_type ktype_mc_set_attribs = {
* /sys/devices/system/edac/mc
*/
static struct kset mc_kset = {
- .kobj = {.name = "mc", .ktype = &ktype_mc_set_attribs },
+ .kobj = {.ktype = &ktype_mc_set_attribs },
.ktype = &ktype_mci,
};
@@ -1010,6 +1010,7 @@ int edac_sysfs_setup_mc_kset(void)
}
/* Init the MC's kobject */
+ kobject_set_name(&mc_kset.kobj, "mc");
mc_kset.kobj.parent = &edac_class->kset.kobj;
/* register the mc_kset */