]> git.karo-electronics.de Git - linux-beck.git/blobdiff - drivers/acpi/acpi_platform.c
ACPICA: Dispatcher: Update thread ID for recursive method calls
[linux-beck.git] / drivers / acpi / acpi_platform.c
index b6f7fa3a1d403ea95428808f49edab475422e80a..159f7f19abceb59816491425daec8df080e482da 100644 (file)
@@ -43,7 +43,6 @@ static const struct acpi_device_id forbidden_id_list[] = {
 struct platform_device *acpi_create_platform_device(struct acpi_device *adev)
 {
        struct platform_device *pdev = NULL;
-       struct acpi_device *acpi_parent;
        struct platform_device_info pdevinfo;
        struct resource_entry *rentry;
        struct list_head resource_list;
@@ -82,22 +81,8 @@ struct platform_device *acpi_create_platform_device(struct acpi_device *adev)
         * attached to it, that physical device should be the parent of the
         * platform device we are about to create.
         */
-       pdevinfo.parent = NULL;
-       acpi_parent = adev->parent;
-       if (acpi_parent) {
-               struct acpi_device_physical_node *entry;
-               struct list_head *list;
-
-               mutex_lock(&acpi_parent->physical_node_lock);
-               list = &acpi_parent->physical_node_list;
-               if (!list_empty(list)) {
-                       entry = list_first_entry(list,
-                                       struct acpi_device_physical_node,
-                                       node);
-                       pdevinfo.parent = entry->dev;
-               }
-               mutex_unlock(&acpi_parent->physical_node_lock);
-       }
+       pdevinfo.parent = adev->parent ?
+               acpi_get_first_physical_node(adev->parent) : NULL;
        pdevinfo.name = dev_name(&adev->dev);
        pdevinfo.id = -1;
        pdevinfo.res = resources;