diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-08-06 19:19:37 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-08-07 17:41:47 -0400 |
commit | 4005520648c7d6cf28e74addb52bc4a793eea3eb (patch) | |
tree | 6908b1a34e283d6854134ac35c75b7ad5c97d47e /drivers/acpi/glue.c | |
parent | bdbdbf91081250657d018fc66d7cd0c07f337070 (diff) |
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: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Toshi Kani <toshi.kani@hp.com>
Acked-by: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
Diffstat (limited to 'drivers/acpi/glue.c')
-rw-r--r-- | drivers/acpi/glue.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/acpi/glue.c b/drivers/acpi/glue.c index 92cacb12ef5c..914a34601231 100644 --- a/drivers/acpi/glue.c +++ b/drivers/acpi/glue.c | |||
@@ -242,8 +242,6 @@ int acpi_bind_one(struct device *dev, acpi_handle handle) | |||
242 | list_add(&physical_node->node, physnode_list); | 242 | list_add(&physical_node->node, physnode_list); |
243 | acpi_dev->physical_node_count++; | 243 | acpi_dev->physical_node_count++; |
244 | 244 | ||
245 | mutex_unlock(&acpi_dev->physical_node_lock); | ||
246 | |||
247 | if (!ACPI_HANDLE(dev)) | 245 | if (!ACPI_HANDLE(dev)) |
248 | ACPI_HANDLE_SET(dev, acpi_dev->handle); | 246 | ACPI_HANDLE_SET(dev, acpi_dev->handle); |
249 | 247 | ||
@@ -253,6 +251,8 @@ int acpi_bind_one(struct device *dev, acpi_handle handle) | |||
253 | retval = sysfs_create_link(&dev->kobj, &acpi_dev->dev.kobj, | 251 | retval = sysfs_create_link(&dev->kobj, &acpi_dev->dev.kobj, |
254 | "firmware_node"); | 252 | "firmware_node"); |
255 | 253 | ||
254 | mutex_unlock(&acpi_dev->physical_node_lock); | ||
255 | |||
256 | if (acpi_dev->wakeup.flags.valid) | 256 | if (acpi_dev->wakeup.flags.valid) |
257 | device_set_wakeup_capable(dev, true); | 257 | device_set_wakeup_capable(dev, true); |
258 | 258 | ||