From: Bjorn Helgaas Date: Wed, 25 Sep 2013 20:23:20 +0000 (-0600) Subject: ACPI / hotplug: Use kobject_init_and_add() instead of _init() and _add() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=acd3e2c99464c0391885d58dbe7c99a11d4c0289;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git ACPI / hotplug: Use kobject_init_and_add() instead of _init() and _add() Use kobject_init_and_add() since we have nothing special to do between kobject_init() and kobject_add(). Signed-off-by: Bjorn Helgaas Signed-off-by: Rafael J. Wysocki --- diff --git a/drivers/acpi/sysfs.c b/drivers/acpi/sysfs.c index 75432819579c..bb6045c5385b 100644 --- a/drivers/acpi/sysfs.c +++ b/drivers/acpi/sysfs.c @@ -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;