diff options
Diffstat (limited to 'drivers/acpi/sysfs.c')
-rw-r--r-- | drivers/acpi/sysfs.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/acpi/sysfs.c b/drivers/acpi/sysfs.c index b55778704444..db5293650f62 100644 --- a/drivers/acpi/sysfs.c +++ b/drivers/acpi/sysfs.c | |||
@@ -767,13 +767,8 @@ void acpi_sysfs_add_hotplug_profile(struct acpi_hotplug_profile *hotplug, | |||
767 | if (!hotplug_kobj) | 767 | if (!hotplug_kobj) |
768 | goto err_out; | 768 | goto err_out; |
769 | 769 | ||
770 | kobject_init(&hotplug->kobj, &acpi_hotplug_profile_ktype); | 770 | error = kobject_init_and_add(&hotplug->kobj, |
771 | error = kobject_set_name(&hotplug->kobj, "%s", name); | 771 | &acpi_hotplug_profile_ktype, hotplug_kobj, "%s", name); |
772 | if (error) | ||
773 | goto err_out; | ||
774 | |||
775 | hotplug->kobj.parent = hotplug_kobj; | ||
776 | error = kobject_add(&hotplug->kobj, hotplug_kobj, NULL); | ||
777 | if (error) | 772 | if (error) |
778 | goto err_out; | 773 | goto err_out; |
779 | 774 | ||