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

Commit 40055206 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki
Browse files

ACPI: Create symlinks in acpi_bind_one() under physical_node_lock



Put the creation of symlinks in acpi_bind_one() under the
physical_node_lock mutex of the given ACPI device object, because
that is part of the binding operation logically (those links are
already removed under that mutex too).

Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: default avatarToshi Kani <toshi.kani@hp.com>
Acked-by: default avatarYasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
parent bdbdbf91
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -242,8 +242,6 @@ int acpi_bind_one(struct device *dev, acpi_handle handle)
	list_add(&physical_node->node, physnode_list);
	acpi_dev->physical_node_count++;

	mutex_unlock(&acpi_dev->physical_node_lock);

	if (!ACPI_HANDLE(dev))
		ACPI_HANDLE_SET(dev, acpi_dev->handle);

@@ -253,6 +251,8 @@ int acpi_bind_one(struct device *dev, acpi_handle handle)
	retval = sysfs_create_link(&dev->kobj, &acpi_dev->dev.kobj,
		"firmware_node");

	mutex_unlock(&acpi_dev->physical_node_lock);

	if (acpi_dev->wakeup.flags.valid)
		device_set_wakeup_capable(dev, true);