diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2007-12-17 15:54:39 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-01-24 20:40:27 -0800 |
commit | d6d292c451e0ffe715fff36dc3a1129868258fa3 (patch) | |
tree | 6c7ec415f35a2ca06851cd014f437dc4b7a8829a /drivers/firmware/efivars.c | |
parent | dd002e807486f9858147c073069a37ba625baad8 (diff) | |
download | linux-d6d292c451e0ffe715fff36dc3a1129868258fa3.tar.gz linux-d6d292c451e0ffe715fff36dc3a1129868258fa3.tar.bz2 linux-d6d292c451e0ffe715fff36dc3a1129868258fa3.zip |
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/efivars.c')
-rw-r--r-- | drivers/firmware/efivars.c | 6 |
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, *(short_name + strlen(short_name)) = '-'; efi_guid_unparse(vendor_guid, short_name + strlen(short_name)); - kobject_set_name(&new_efivar->kobj, "%s", short_name); new_efivar->kobj.kset = vars_kset; - new_efivar->kobj.ktype = &efivar_ktype; - i = kobject_register(&new_efivar->kobj); + i = kobject_init_and_add(&new_efivar->kobj, &efivar_ktype, NULL, + "%s", short_name); if (i) { kfree(short_name); kfree(new_efivar); return 1; } + kobject_uevent(&new_efivar->kobj, KOBJ_ADD); kfree(short_name); short_name = NULL; |