Commit dd002e80 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

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: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 35be0681
...@@ -721,13 +721,13 @@ edd_device_register(struct edd_device *edev, int i) ...@@ -721,13 +721,13 @@ edd_device_register(struct edd_device *edev, int i)
if (!edev) if (!edev)
return 1; return 1;
edd_dev_set_info(edev, i); edd_dev_set_info(edev, i);
kobject_set_name(&edev->kobj, "int13_dev%02x",
0x80 + i);
edev->kobj.kset = edd_kset; edev->kobj.kset = edd_kset;
edev->kobj.ktype = &edd_ktype; error = kobject_init_and_add(&edev->kobj, &edd_ktype, NULL,
error = kobject_register(&edev->kobj); "int13_dev%02x", 0x80 + i);
if (!error) if (!error) {
edd_populate_dir(edev); edd_populate_dir(edev);
kobject_uevent(&edev->kobj, KOBJ_ADD);
}
return error; return error;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment