diff mbox

[1/3] ACPI / hotplug: Set kobject name via kobject_add(), not kobject_set_name()

Message ID 20130925202304.18667.26104.stgit@bhelgaas-glaptop.roam.corp.google.com (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Bjorn Helgaas Sept. 25, 2013, 8:23 p.m. UTC
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>
---
 drivers/acpi/sysfs.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)


--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/acpi/sysfs.c b/drivers/acpi/sysfs.c
index 05306a5..ea68583 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;