summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/sysfs.c
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2013-09-25 14:23:20 -0600
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-09-30 19:58:18 +0200
commitacd3e2c99464c0391885d58dbe7c99a11d4c0289 (patch)
tree1771219c4d30e026e0e5504045d3268602e6b03b /drivers/acpi/sysfs.c
parentcae712724161c27f5e8c39bb3946449e1c179881 (diff)
downloadtalos-op-linux-acd3e2c99464c0391885d58dbe7c99a11d4c0289.tar.gz
talos-op-linux-acd3e2c99464c0391885d58dbe7c99a11d4c0289.zip
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 <bhelgaas@google.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/sysfs.c')
-rw-r--r--drivers/acpi/sysfs.c5
1 files changed, 2 insertions, 3 deletions
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;
OpenPOWER on IntegriCloud