Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux...
[pandora-kernel.git] / drivers / acpi / acpica / evxfregn.c
index c85c8c4..00cd956 100644 (file)
@@ -130,20 +130,21 @@ acpi_install_address_space_handler(acpi_handle device,
        case ACPI_ADR_SPACE_PCI_CONFIG:
        case ACPI_ADR_SPACE_DATA_TABLE:
 
-               if (acpi_gbl_reg_methods_executed) {
+               if (!acpi_gbl_reg_methods_executed) {
 
-                       /* Run all _REG methods for this address space */
-
-                       status = acpi_ev_execute_reg_methods(node, space_id);
+                       /* We will defer execution of the _REG methods for this space */
+                       goto unlock_and_exit;
                }
                break;
 
        default:
-
-               status = acpi_ev_execute_reg_methods(node, space_id);
                break;
        }
 
+       /* Run all _REG methods for this address space */
+
+       status = acpi_ev_execute_reg_methods(node, space_id);
+
       unlock_and_exit:
        (void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE);
        return_ACPI_STATUS(status);