aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/utilities/uteval.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/utilities/uteval.c')
-rw-r--r--drivers/acpi/utilities/uteval.c42
1 files changed, 19 insertions, 23 deletions
diff --git a/drivers/acpi/utilities/uteval.c b/drivers/acpi/utilities/uteval.c
index 7b81d5ef3c32..f4dc374a0eec 100644
--- a/drivers/acpi/utilities/uteval.c
+++ b/drivers/acpi/utilities/uteval.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2005, R. Byron Moore 8 * Copyright (C) 2000 - 2006, R. Byron Moore
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
@@ -95,7 +95,9 @@ acpi_status acpi_ut_osi_implementation(struct acpi_walk_state *walk_state)
95 95
96 for (i = 0; i < ACPI_NUM_OSI_STRINGS; i++) { 96 for (i = 0; i < ACPI_NUM_OSI_STRINGS; i++) {
97 if (!ACPI_STRCMP(string_desc->string.pointer, 97 if (!ACPI_STRCMP(string_desc->string.pointer,
98 (char *)acpi_gbl_valid_osi_strings[i])) { 98 ACPI_CAST_PTR(char,
99 acpi_gbl_valid_osi_strings[i])))
100 {
99 /* This string is supported */ 101 /* This string is supported */
100 102
101 return_desc->integer.value = 0xFFFFFFFF; 103 return_desc->integer.value = 0xFFFFFFFF;
@@ -152,8 +154,8 @@ acpi_ut_evaluate_object(struct acpi_namespace_node *prefix_node,
152 acpi_ut_get_node_name(prefix_node), 154 acpi_ut_get_node_name(prefix_node),
153 path)); 155 path));
154 } else { 156 } else {
155 ACPI_REPORT_METHOD_ERROR("Method execution failed", 157 ACPI_REPORT_MTERROR("Method execution failed",
156 prefix_node, path, status); 158 prefix_node, path, status);
157 } 159 }
158 160
159 return_ACPI_STATUS(status); 161 return_ACPI_STATUS(status);
@@ -163,9 +165,8 @@ acpi_ut_evaluate_object(struct acpi_namespace_node *prefix_node,
163 165
164 if (!info.return_object) { 166 if (!info.return_object) {
165 if (expected_return_btypes) { 167 if (expected_return_btypes) {
166 ACPI_REPORT_METHOD_ERROR("No object was returned from", 168 ACPI_REPORT_MTERROR("No object was returned from",
167 prefix_node, path, 169 prefix_node, path, AE_NOT_EXIST);
168 AE_NOT_EXIST);
169 170
170 return_ACPI_STATUS(AE_NOT_EXIST); 171 return_ACPI_STATUS(AE_NOT_EXIST);
171 } 172 }
@@ -210,15 +211,10 @@ acpi_ut_evaluate_object(struct acpi_namespace_node *prefix_node,
210 /* Is the return object one of the expected types? */ 211 /* Is the return object one of the expected types? */
211 212
212 if (!(expected_return_btypes & return_btype)) { 213 if (!(expected_return_btypes & return_btype)) {
213 ACPI_REPORT_METHOD_ERROR("Return object type is incorrect", 214 ACPI_REPORT_MTERROR("Return object type is incorrect",
214 prefix_node, path, AE_TYPE); 215 prefix_node, path, AE_TYPE);
215 216
216 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 217 ACPI_REPORT_ERROR(("Type returned from %s was incorrect: %s, expected Btypes: %X\n", path, acpi_ut_get_object_type_name(info.return_object), expected_return_btypes));
217 "Type returned from %s was incorrect: %s, expected Btypes: %X\n",
218 path,
219 acpi_ut_get_object_type_name(info.
220 return_object),
221 expected_return_btypes));
222 218
223 /* On error exit, we must delete the return object */ 219 /* On error exit, we must delete the return object */
224 220
@@ -592,7 +588,7 @@ acpi_ut_execute_STA(struct acpi_namespace_node *device_node, u32 * flags)
592 "_STA on %4.4s was not found, assuming device is present\n", 588 "_STA on %4.4s was not found, assuming device is present\n",
593 acpi_ut_get_node_name(device_node))); 589 acpi_ut_get_node_name(device_node)));
594 590
595 *flags = 0x0F; 591 *flags = ACPI_UINT32_MAX;
596 status = AE_OK; 592 status = AE_OK;
597 } 593 }
598 594
@@ -637,17 +633,17 @@ acpi_ut_execute_sxds(struct acpi_namespace_node *device_node, u8 * highest)
637 for (i = 0; i < 4; i++) { 633 for (i = 0; i < 4; i++) {
638 highest[i] = 0xFF; 634 highest[i] = 0xFF;
639 status = acpi_ut_evaluate_object(device_node, 635 status = acpi_ut_evaluate_object(device_node,
640 (char *) 636 ACPI_CAST_PTR(char,
641 acpi_gbl_highest_dstate_names 637 acpi_gbl_highest_dstate_names
642 [i], ACPI_BTYPE_INTEGER, 638 [i]),
643 &obj_desc); 639 ACPI_BTYPE_INTEGER, &obj_desc);
644 if (ACPI_FAILURE(status)) { 640 if (ACPI_FAILURE(status)) {
645 if (status != AE_NOT_FOUND) { 641 if (status != AE_NOT_FOUND) {
646 ACPI_DEBUG_PRINT((ACPI_DB_EXEC, 642 ACPI_DEBUG_PRINT((ACPI_DB_EXEC,
647 "%s on Device %4.4s, %s\n", 643 "%s on Device %4.4s, %s\n",
648 (char *) 644 ACPI_CAST_PTR(char,
649 acpi_gbl_highest_dstate_names 645 acpi_gbl_highest_dstate_names
650 [i], 646 [i]),
651 acpi_ut_get_node_name 647 acpi_ut_get_node_name
652 (device_node), 648 (device_node),
653 acpi_format_exception 649 acpi_format_exception