|
@@ -762,9 +762,8 @@ void acpi_sysfs_add_hotplug_profile(struct acpi_hotplug_profile *hotplug,
|
|
|
if (!hotplug_kobj)
|
|
|
goto err_out;
|
|
|
|
|
|
- kobject_init(&hotplug->kobj, &acpi_hotplug_profile_ktype);
|
|
|
-
|
|
|
- error = kobject_add(&hotplug->kobj, hotplug_kobj, "%s", name);
|
|
|
+ error = kobject_init_and_add(&hotplug->kobj,
|
|
|
+ &acpi_hotplug_profile_ktype, hotplug_kobj, "%s", name);
|
|
|
if (error)
|
|
|
goto err_out;
|
|
|
|