diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2013-09-25 14:23:04 -0600 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-09-30 19:58:18 +0200 |
commit | 9b5b06740194c8fa1cddb3aa5fe69fd6f5199bc4 (patch) | |
tree | 0277f62f309c3f8375380aa0c68dacae99cc1012 /drivers/acpi/sysfs.c | |
parent | 6dedcca610c6d6189b4a54d32118d1654adb73d2 (diff) | |
download | linux-9b5b06740194c8fa1cddb3aa5fe69fd6f5199bc4.tar.bz2 |
ACPI / hotplug: Set kobject name via kobject_add(), not kobject_set_name()
Set the kobject name via kobject_add() instead of using kobject_set_name(),
which is deprecated per Documentation/kobject.txt.
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.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/acpi/sysfs.c b/drivers/acpi/sysfs.c index 05306a59aedc..ea685835b834 100644 --- a/drivers/acpi/sysfs.c +++ b/drivers/acpi/sysfs.c @@ -763,12 +763,9 @@ void acpi_sysfs_add_hotplug_profile(struct acpi_hotplug_profile *hotplug, goto err_out; kobject_init(&hotplug->kobj, &acpi_hotplug_profile_ktype); - error = kobject_set_name(&hotplug->kobj, "%s", name); - if (error) - goto err_out; hotplug->kobj.parent = hotplug_kobj; - error = kobject_add(&hotplug->kobj, hotplug_kobj, NULL); + error = kobject_add(&hotplug->kobj, hotplug_kobj, "%s", name); if (error) goto err_out; |