From: Kamalesh Babulal Using the kobject_set_name function to set the kobject k_name. Signed-off-by: Kamalesh Babulal Cc: Greg KH Signed-off-by: Andrew Morton --- drivers/pci/hotplug/rpadlpar_sysfs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff -puN drivers/pci/hotplug/rpadlpar_sysfs.c~fix-3-gregkh-driver-kobject-remove-the-static-array-for-the-name drivers/pci/hotplug/rpadlpar_sysfs.c --- a/drivers/pci/hotplug/rpadlpar_sysfs.c~fix-3-gregkh-driver-kobject-remove-the-static-array-for-the-name +++ a/drivers/pci/hotplug/rpadlpar_sysfs.c @@ -129,17 +129,17 @@ struct kobj_type ktype_dlpar_io = { }; struct kset dlpar_io_kset = { - .kobj = {.name = DLPAR_KOBJ_NAME, - .ktype = &ktype_dlpar_io, - .parent = &pci_hotplug_slots_subsys.kobj}, + .kobj = {.ktype = &ktype_dlpar_io, + .parent = &pci_hotplug_slots_subsys.kobj}, .ktype = &ktype_dlpar_io, }; int dlpar_sysfs_init(void) { + kobject_set_name(&dlpar_io_kset.kobj, DLPAR_KOBJ_NAME); if (kset_register(&dlpar_io_kset)) { printk(KERN_ERR "rpadlpar_io: cannot register kset for %s\n", - dlpar_io_kset.kobj.name); + dlpar_io_kset.kobj.k_name); return -EINVAL; } _