ACPI: ACPICA 20060331
[deliverable/linux.git] / drivers / acpi / events / evrgnini.c
index db98747fe54d0f2e17dbb063f8255fbfb1fc3f82..d1809f4240a40af73e0562dec4a05c4d28aa7014 100644 (file)
@@ -75,7 +75,18 @@ acpi_ev_system_memory_region_setup(acpi_handle handle,
 
        if (function == ACPI_REGION_DEACTIVATE) {
                if (*region_context) {
-                       ACPI_FREE(*region_context);
+                       local_region_context =
+                           (struct acpi_mem_space_context *)*region_context;
+
+                       /* Delete a cached mapping if present */
+
+                       if (local_region_context->mapped_length) {
+                               acpi_os_unmap_memory(local_region_context->
+                                                    mapped_logical_address,
+                                                    local_region_context->
+                                                    mapped_length);
+                       }
+                       ACPI_FREE(local_region_context);
                        *region_context = NULL;
                }
                return_ACPI_STATUS(AE_OK);
This page took 0.03609 seconds and 5 git commands to generate.