summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2007-12-17 20:54:39 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2008-01-25 05:40:26 +0100
commitdd002e807486f9858147c073069a37ba625baad8 (patch)
tree5c1f484d65c41d56175a47ba45089808c0dd28be
parentKobject: change drivers/infiniband to use kobject_init_and_add (diff)
downloadlinux-dd002e807486f9858147c073069a37ba625baad8.tar.xz
linux-dd002e807486f9858147c073069a37ba625baad8.zip
Kobject: change drivers/firmware/edd.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>
-rw-r--r--drivers/firmware/edd.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/firmware/edd.c b/drivers/firmware/edd.c
index ddcc95793068..dc0b87b13505 100644
--- a/drivers/firmware/edd.c
+++ b/drivers/firmware/edd.c
@@ -721,13 +721,13 @@ edd_device_register(struct edd_device *edev, int i)
if (!edev)
return 1;
edd_dev_set_info(edev, i);
- kobject_set_name(&edev->kobj, "int13_dev%02x",
- 0x80 + i);
edev->kobj.kset = edd_kset;
- edev->kobj.ktype = &edd_ktype;
- error = kobject_register(&edev->kobj);
- if (!error)
+ error = kobject_init_and_add(&edev->kobj, &edd_ktype, NULL,
+ "int13_dev%02x", 0x80 + i);
+ if (!error) {
edd_populate_dir(edev);
+ kobject_uevent(&edev->kobj, KOBJ_ADD);
+ }
return error;
}