diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2007-12-17 14:54:39 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-01-24 23:40:26 -0500 |
commit | dd002e807486f9858147c073069a37ba625baad8 (patch) | |
tree | 5c1f484d65c41d56175a47ba45089808c0dd28be /drivers | |
parent | 35be0681983752116a8161ad3b30e830963108a4 (diff) |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/firmware/edd.c | 10 |
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) | |||
721 | if (!edev) | 721 | if (!edev) |
722 | return 1; | 722 | return 1; |
723 | edd_dev_set_info(edev, i); | 723 | edd_dev_set_info(edev, i); |
724 | kobject_set_name(&edev->kobj, "int13_dev%02x", | ||
725 | 0x80 + i); | ||
726 | edev->kobj.kset = edd_kset; | 724 | edev->kobj.kset = edd_kset; |
727 | edev->kobj.ktype = &edd_ktype; | 725 | error = kobject_init_and_add(&edev->kobj, &edd_ktype, NULL, |
728 | error = kobject_register(&edev->kobj); | 726 | "int13_dev%02x", 0x80 + i); |
729 | if (!error) | 727 | if (!error) { |
730 | edd_populate_dir(edev); | 728 | edd_populate_dir(edev); |
729 | kobject_uevent(&edev->kobj, KOBJ_ADD); | ||
730 | } | ||
731 | return error; | 731 | return error; |
732 | } | 732 | } |
733 | 733 | ||