aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/dispatcher/dswstate.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/dispatcher/dswstate.c')
-rw-r--r--drivers/acpi/dispatcher/dswstate.c40
1 files changed, 7 insertions, 33 deletions
diff --git a/drivers/acpi/dispatcher/dswstate.c b/drivers/acpi/dispatcher/dswstate.c
index 9cd3db652b31..5621665991b5 100644
--- a/drivers/acpi/dispatcher/dswstate.c
+++ b/drivers/acpi/dispatcher/dswstate.c
@@ -261,12 +261,12 @@ acpi_ds_result_pop_from_bottom (
261 261
262 if (!*object) { 262 if (!*object) {
263 ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, 263 ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
264 "Null operand! State=%p #Ops=%X, Index=%X\n", 264 "Null operand! State=%p #Ops=%X Index=%X\n",
265 walk_state, state->results.num_results, (u32) index)); 265 walk_state, state->results.num_results, (u32) index));
266 return (AE_AML_NO_RETURN_VALUE); 266 return (AE_AML_NO_RETURN_VALUE);
267 } 267 }
268 268
269 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Obj=%p [%s], Results=%p State=%p\n", 269 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Obj=%p [%s] Results=%p State=%p\n",
270 *object, (*object) ? acpi_ut_get_object_type_name (*object) : "NULL", 270 *object, (*object) ? acpi_ut_get_object_type_name (*object) : "NULL",
271 state, walk_state)); 271 state, walk_state));
272 272
@@ -681,7 +681,7 @@ acpi_ds_create_walk_state (
681 ACPI_FUNCTION_TRACE ("ds_create_walk_state"); 681 ACPI_FUNCTION_TRACE ("ds_create_walk_state");
682 682
683 683
684 walk_state = acpi_ut_acquire_from_cache (ACPI_MEM_LIST_WALK); 684 walk_state = ACPI_MEM_CALLOCATE (sizeof (struct acpi_walk_state));
685 if (!walk_state) { 685 if (!walk_state) {
686 return_PTR (NULL); 686 return_PTR (NULL);
687 } 687 }
@@ -704,7 +704,7 @@ acpi_ds_create_walk_state (
704 704
705 status = acpi_ds_result_stack_push (walk_state); 705 status = acpi_ds_result_stack_push (walk_state);
706 if (ACPI_FAILURE (status)) { 706 if (ACPI_FAILURE (status)) {
707 acpi_ut_release_to_cache (ACPI_MEM_LIST_WALK, walk_state); 707 ACPI_MEM_FREE (walk_state);
708 return_PTR (NULL); 708 return_PTR (NULL);
709 } 709 }
710 710
@@ -744,7 +744,7 @@ acpi_ds_init_aml_walk (
744 u8 *aml_start, 744 u8 *aml_start,
745 u32 aml_length, 745 u32 aml_length,
746 struct acpi_parameter_info *info, 746 struct acpi_parameter_info *info,
747 u32 pass_number) 747 u8 pass_number)
748{ 748{
749 acpi_status status; 749 acpi_status status;
750 struct acpi_parse_state *parser_state = &walk_state->parser_state; 750 struct acpi_parse_state *parser_state = &walk_state->parser_state;
@@ -762,6 +762,7 @@ acpi_ds_init_aml_walk (
762 /* The next_op of the next_walk will be the beginning of the method */ 762 /* The next_op of the next_walk will be the beginning of the method */
763 763
764 walk_state->next_op = NULL; 764 walk_state->next_op = NULL;
765 walk_state->pass_number = pass_number;
765 766
766 if (info) { 767 if (info) {
767 if (info->parameter_type == ACPI_PARAM_GPE) { 768 if (info->parameter_type == ACPI_PARAM_GPE) {
@@ -899,38 +900,11 @@ acpi_ds_delete_walk_state (
899 acpi_ut_delete_generic_state (state); 900 acpi_ut_delete_generic_state (state);
900 } 901 }
901 902
902 acpi_ut_release_to_cache (ACPI_MEM_LIST_WALK, walk_state); 903 ACPI_MEM_FREE (walk_state);
903 return_VOID; 904 return_VOID;
904} 905}
905 906
906 907
907#ifdef ACPI_ENABLE_OBJECT_CACHE
908/******************************************************************************
909 *
910 * FUNCTION: acpi_ds_delete_walk_state_cache
911 *
912 * PARAMETERS: None
913 *
914 * RETURN: None
915 *
916 * DESCRIPTION: Purge the global state object cache. Used during subsystem
917 * termination.
918 *
919 ******************************************************************************/
920
921void
922acpi_ds_delete_walk_state_cache (
923 void)
924{
925 ACPI_FUNCTION_TRACE ("ds_delete_walk_state_cache");
926
927
928 acpi_ut_delete_generic_cache (ACPI_MEM_LIST_WALK);
929 return_VOID;
930}
931#endif
932
933
934#ifdef ACPI_OBSOLETE_FUNCTIONS 908#ifdef ACPI_OBSOLETE_FUNCTIONS
935/******************************************************************************* 909/*******************************************************************************
936 * 910 *