From defba1d8f233c0d5cf3e1ea6aeb898eca7231860 Mon Sep 17 00:00:00 2001 From: Bob Moore Date: Fri, 16 Dec 2005 17:05:00 -0500 Subject: [ACPI] ACPICA 20051216 Implemented optional support to allow unresolved names within ASL Package objects. A null object is inserted in the package when a named reference cannot be located in the current namespace. Enabled via the interpreter slack flag which Linux has enabled by default (acpi=strict to disable slack). This should eliminate AE_NOT_FOUND exceptions seen on machines that contain such code. Implemented an optimization to the initialization sequence that can improve boot time. During ACPI device initialization, the _STA method is now run if and only if the _INI method exists. The _STA method is used to determine if the device is present; An _INI can only be run if _STA returns present, but it is a waste of time to run the _STA method if the _INI does not exist. (Prototype and assistance from Dong Wei) Implemented use of the C99 uintptr_t for the pointer casting macros if it is available in the current compiler. Otherwise, the default (void *) cast is used as before. Fixed some possible memory leaks found within the execution path of the Break, Continue, If, and CreateField operators. (Valery Podrezov) Fixed a problem introduced in the 20051202 release where an exception is generated during method execution if a control method attempts to declare another method. Signed-off-by: Bob Moore Signed-off-by: Len Brown --- drivers/acpi/utilities/utglobal.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'drivers/acpi/utilities/utglobal.c') diff --git a/drivers/acpi/utilities/utglobal.c b/drivers/acpi/utilities/utglobal.c index 6828c7aefa8..7c59c2b0d95 100644 --- a/drivers/acpi/utilities/utglobal.c +++ b/drivers/acpi/utilities/utglobal.c @@ -485,7 +485,7 @@ char *acpi_ut_get_region_name(u8 space_id) return ("invalid_space_id"); } - return ((char *)acpi_gbl_region_types[space_id]); + return (ACPI_CAST_PTR(char, acpi_gbl_region_types[space_id])); } /******************************************************************************* @@ -690,11 +690,12 @@ char *acpi_ut_get_descriptor_name(void *object) } if (ACPI_GET_DESCRIPTOR_TYPE(object) > ACPI_DESC_TYPE_MAX) { - return ((char *)acpi_gbl_bad_type); + return (ACPI_CAST_PTR(char, acpi_gbl_bad_type)); } - return ((char *) - acpi_gbl_desc_type_names[ACPI_GET_DESCRIPTOR_TYPE(object)]); + return (ACPI_CAST_PTR(char, + acpi_gbl_desc_type_names[ACPI_GET_DESCRIPTOR_TYPE + (object)])); } -- cgit v1.2.3