aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firmware
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2007-12-17 14:54:39 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2008-01-24 23:40:27 -0500
commitd6d292c451e0ffe715fff36dc3a1129868258fa3 (patch)
tree6c7ec415f35a2ca06851cd014f437dc4b7a8829a /drivers/firmware
parentdd002e807486f9858147c073069a37ba625baad8 (diff)
Kobject: change drivers/firmware/efivars.c to use kobject_init_and_add
Stop using kobject_register, as this way we can control the sending of the uevent properly, after everything is properly initialized. Cc: Matt Domsch <Matt_Domsch@dell.com> Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/firmware')
-rw-r--r--drivers/firmware/efivars.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/firmware/efivars.c b/drivers/firmware/efivars.c
index 7f9f086106cc..b61a72fb6219 100644
--- a/drivers/firmware/efivars.c
+++ b/drivers/firmware/efivars.c
@@ -617,16 +617,16 @@ efivar_create_sysfs_entry(unsigned long variable_name_size,
617 *(short_name + strlen(short_name)) = '-'; 617 *(short_name + strlen(short_name)) = '-';
618 efi_guid_unparse(vendor_guid, short_name + strlen(short_name)); 618 efi_guid_unparse(vendor_guid, short_name + strlen(short_name));
619 619
620 kobject_set_name(&new_efivar->kobj, "%s", short_name);
621 new_efivar->kobj.kset = vars_kset; 620 new_efivar->kobj.kset = vars_kset;
622 new_efivar->kobj.ktype = &efivar_ktype; 621 i = kobject_init_and_add(&new_efivar->kobj, &efivar_ktype, NULL,
623 i = kobject_register(&new_efivar->kobj); 622 "%s", short_name);
624 if (i) { 623 if (i) {
625 kfree(short_name); 624 kfree(short_name);
626 kfree(new_efivar); 625 kfree(new_efivar);
627 return 1; 626 return 1;
628 } 627 }
629 628
629 kobject_uevent(&new_efivar->kobj, KOBJ_ADD);
630 kfree(short_name); 630 kfree(short_name);
631 short_name = NULL; 631 short_name = NULL;
632 632