Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9b5b0674 authored by Bjorn Helgaas's avatar Bjorn Helgaas Committed by Rafael J. Wysocki
Browse files

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: default avatarBjorn Helgaas <bhelgaas@google.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 6dedcca6
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -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;