X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Facpi%2Fevents%2Fevrgnini.c;fp=drivers%2Facpi%2Fevents%2Fevrgnini.c;h=baed8c1a1b9fb74542f9ef1345382ab1a660fa09;hb=64ba3f394c830ec48a1c31b53dcae312c56f1604;hp=5b3c7a85eb9a609e7e1fcbc8910f15e95e5f1f26;hpb=be1e6109ac94a859551f8e1774eb9a8469fe055c;p=linux-2.6.git diff --git a/drivers/acpi/events/evrgnini.c b/drivers/acpi/events/evrgnini.c index 5b3c7a85e..baed8c1a1 100644 --- a/drivers/acpi/events/evrgnini.c +++ b/drivers/acpi/events/evrgnini.c @@ -71,22 +71,11 @@ acpi_ev_system_memory_region_setup(acpi_handle handle, (union acpi_operand_object *)handle; struct acpi_mem_space_context *local_region_context; - ACPI_FUNCTION_TRACE(ev_system_memory_region_setup); + ACPI_FUNCTION_TRACE("ev_system_memory_region_setup"); if (function == ACPI_REGION_DEACTIVATE) { if (*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); + ACPI_MEM_FREE(*region_context); *region_context = NULL; } return_ACPI_STATUS(AE_OK); @@ -95,7 +84,7 @@ acpi_ev_system_memory_region_setup(acpi_handle handle, /* Create a new context */ local_region_context = - ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_mem_space_context)); + ACPI_MEM_CALLOCATE(sizeof(struct acpi_mem_space_context)); if (!(local_region_context)) { return_ACPI_STATUS(AE_NO_MEMORY); } @@ -129,7 +118,7 @@ acpi_ev_io_space_region_setup(acpi_handle handle, u32 function, void *handler_context, void **region_context) { - ACPI_FUNCTION_TRACE(ev_io_space_region_setup); + ACPI_FUNCTION_TRACE("ev_io_space_region_setup"); if (function == ACPI_REGION_DEACTIVATE) { *region_context = NULL; @@ -172,7 +161,7 @@ acpi_ev_pci_config_region_setup(acpi_handle handle, (union acpi_operand_object *)handle; struct acpi_device_id object_hID; - ACPI_FUNCTION_TRACE(ev_pci_config_region_setup); + ACPI_FUNCTION_TRACE("ev_pci_config_region_setup"); handler_obj = region_obj->region.handler; if (!handler_obj) { @@ -189,7 +178,7 @@ acpi_ev_pci_config_region_setup(acpi_handle handle, *region_context = NULL; if (function == ACPI_REGION_DEACTIVATE) { if (pci_id) { - ACPI_FREE(pci_id); + ACPI_MEM_FREE(pci_id); } return_ACPI_STATUS(status); } @@ -210,7 +199,6 @@ acpi_ev_pci_config_region_setup(acpi_handle handle, * handlers with that device. */ if (handler_obj->address_space.node == acpi_gbl_root_node) { - /* Start search from the parent object */ pci_root_node = parent_node; @@ -232,7 +220,6 @@ acpi_ev_pci_config_region_setup(acpi_handle handle, PCI_EXPRESS_ROOT_HID_STRING, sizeof(PCI_EXPRESS_ROOT_HID_STRING))))) { - /* Install a handler for this PCI root bridge */ status = @@ -248,7 +235,7 @@ acpi_ev_pci_config_region_setup(acpi_handle handle, } else { ACPI_EXCEPTION((AE_INFO, status, - "Could not install PciConfig handler for Root Bridge %4.4s", + "Could not install pci_config handler for Root Bridge %4.4s", acpi_ut_get_node_name (pci_root_node))); } @@ -275,7 +262,7 @@ acpi_ev_pci_config_region_setup(acpi_handle handle, /* Region is still not initialized. Create a new context */ - pci_id = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_pci_id)); + pci_id = ACPI_MEM_CALLOCATE(sizeof(struct acpi_pci_id)); if (!pci_id) { return_ACPI_STATUS(AE_NO_MEMORY); } @@ -350,7 +337,7 @@ acpi_ev_pci_bar_region_setup(acpi_handle handle, u32 function, void *handler_context, void **region_context) { - ACPI_FUNCTION_TRACE(ev_pci_bar_region_setup); + ACPI_FUNCTION_TRACE("ev_pci_bar_region_setup"); return_ACPI_STATUS(AE_OK); } @@ -377,7 +364,7 @@ acpi_ev_cmos_region_setup(acpi_handle handle, u32 function, void *handler_context, void **region_context) { - ACPI_FUNCTION_TRACE(ev_cmos_region_setup); + ACPI_FUNCTION_TRACE("ev_cmos_region_setup"); return_ACPI_STATUS(AE_OK); } @@ -402,7 +389,7 @@ acpi_ev_default_region_setup(acpi_handle handle, u32 function, void *handler_context, void **region_context) { - ACPI_FUNCTION_TRACE(ev_default_region_setup); + ACPI_FUNCTION_TRACE("ev_default_region_setup"); if (function == ACPI_REGION_DEACTIVATE) { *region_context = NULL; @@ -448,7 +435,7 @@ acpi_ev_initialize_region(union acpi_operand_object *region_obj, acpi_name *reg_name_ptr = (acpi_name *) METHOD_NAME__REG; union acpi_operand_object *region_obj2; - ACPI_FUNCTION_TRACE_U32(ev_initialize_region, acpi_ns_locked); + ACPI_FUNCTION_TRACE_U32("ev_initialize_region", acpi_ns_locked); if (!region_obj) { return_ACPI_STATUS(AE_BAD_PARAMETER); @@ -475,9 +462,8 @@ acpi_ev_initialize_region(union acpi_operand_object *region_obj, /* Find any "_REG" method associated with this region definition */ - status = - acpi_ns_search_one_scope(*reg_name_ptr, node, ACPI_TYPE_METHOD, - &method_node); + status = acpi_ns_search_node(*reg_name_ptr, node, + ACPI_TYPE_METHOD, &method_node); if (ACPI_SUCCESS(status)) { /* * The _REG method is optional and there can be only one per region @@ -492,13 +478,11 @@ acpi_ev_initialize_region(union acpi_operand_object *region_obj, * ie: acpi_gbl_root_node->parent_entry being set to NULL */ while (node) { - /* Check to see if a handler exists */ handler_obj = NULL; obj_desc = acpi_ns_get_attached_object(node); if (obj_desc) { - /* Can only be a handler if the object exists */ switch (node->type) { @@ -523,12 +507,10 @@ acpi_ev_initialize_region(union acpi_operand_object *region_obj, } while (handler_obj) { - /* Is this handler of the correct type? */ if (handler_obj->address_space.space_id == space_id) { - /* Found correct handler */ ACPI_DEBUG_PRINT((ACPI_DB_OPREGION, @@ -589,7 +571,7 @@ acpi_ev_initialize_region(union acpi_operand_object *region_obj, /* If we get here, there is no handler for this region */ ACPI_DEBUG_PRINT((ACPI_DB_OPREGION, - "No handler for RegionType %s(%X) (RegionObj %p)\n", + "No handler for region_type %s(%X) (region_obj %p)\n", acpi_ut_get_region_name(space_id), space_id, region_obj));