[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1201246425-5058-33-git-send-email-gregkh@suse.de>
Date: Thu, 24 Jan 2008 23:32:21 -0800
From: Greg Kroah-Hartman <gregkh@...e.de>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...e.de>,
Matt Domsch <Matt_Domsch@...l.com>,
Kay Sievers <kay.sievers@...y.org>
Subject: [PATCH 112/196] 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@...l.com>
Cc: Kay Sievers <kay.sievers@...y.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@...e.de>
---
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 7f9f086..b61a72f 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;
--
1.5.3.8
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists