aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica/dswstate.c
diff options
context:
space:
mode:
authorJonathan Herman <hermanjl@cs.unc.edu>2013-01-17 16:15:55 -0500
committerJonathan Herman <hermanjl@cs.unc.edu>2013-01-17 16:15:55 -0500
commit8dea78da5cee153b8af9c07a2745f6c55057fe12 (patch)
treea8f4d49d63b1ecc92f2fddceba0655b2472c5bd9 /drivers/acpi/acpica/dswstate.c
parent406089d01562f1e2bf9f089fd7637009ebaad589 (diff)
Patched in Tegra support.
Diffstat (limited to 'drivers/acpi/acpica/dswstate.c')
-rw-r--r--drivers/acpi/acpica/dswstate.c48
1 files changed, 22 insertions, 26 deletions
diff --git a/drivers/acpi/acpica/dswstate.c b/drivers/acpi/acpica/dswstate.c
index 3e65a15a735..a6c374ef991 100644
--- a/drivers/acpi/acpica/dswstate.c
+++ b/drivers/acpi/acpica/dswstate.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2012, Intel Corp. 8 * Copyright (C) 2000 - 2011, Intel Corp.
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
@@ -51,15 +51,14 @@
51ACPI_MODULE_NAME("dswstate") 51ACPI_MODULE_NAME("dswstate")
52 52
53 /* Local prototypes */ 53 /* Local prototypes */
54static acpi_status 54static acpi_status acpi_ds_result_stack_push(struct acpi_walk_state *ws);
55acpi_ds_result_stack_push(struct acpi_walk_state *walk_state); 55static acpi_status acpi_ds_result_stack_pop(struct acpi_walk_state *ws);
56static acpi_status acpi_ds_result_stack_pop(struct acpi_walk_state *walk_state);
57 56
58/******************************************************************************* 57/*******************************************************************************
59 * 58 *
60 * FUNCTION: acpi_ds_result_pop 59 * FUNCTION: acpi_ds_result_pop
61 * 60 *
62 * PARAMETERS: object - Where to return the popped object 61 * PARAMETERS: Object - Where to return the popped object
63 * walk_state - Current Walk state 62 * walk_state - Current Walk state
64 * 63 *
65 * RETURN: Status 64 * RETURN: Status
@@ -133,7 +132,7 @@ acpi_ds_result_pop(union acpi_operand_object **object,
133 * 132 *
134 * FUNCTION: acpi_ds_result_push 133 * FUNCTION: acpi_ds_result_push
135 * 134 *
136 * PARAMETERS: object - Where to return the popped object 135 * PARAMETERS: Object - Where to return the popped object
137 * walk_state - Current Walk state 136 * walk_state - Current Walk state
138 * 137 *
139 * RETURN: Status 138 * RETURN: Status
@@ -297,7 +296,7 @@ static acpi_status acpi_ds_result_stack_pop(struct acpi_walk_state *walk_state)
297 * 296 *
298 * FUNCTION: acpi_ds_obj_stack_push 297 * FUNCTION: acpi_ds_obj_stack_push
299 * 298 *
300 * PARAMETERS: object - Object to push 299 * PARAMETERS: Object - Object to push
301 * walk_state - Current Walk state 300 * walk_state - Current Walk state
302 * 301 *
303 * RETURN: Status 302 * RETURN: Status
@@ -348,7 +347,7 @@ acpi_ds_obj_stack_push(void *object, struct acpi_walk_state * walk_state)
348 * 347 *
349 * RETURN: Status 348 * RETURN: Status
350 * 349 *
351 * DESCRIPTION: Pop this walk's object stack. Objects on the stack are NOT 350 * DESCRIPTION: Pop this walk's object stack. Objects on the stack are NOT
352 * deleted by this routine. 351 * deleted by this routine.
353 * 352 *
354 ******************************************************************************/ 353 ******************************************************************************/
@@ -434,7 +433,7 @@ acpi_ds_obj_stack_pop_and_delete(u32 pop_count,
434 * 433 *
435 * FUNCTION: acpi_ds_get_current_walk_state 434 * FUNCTION: acpi_ds_get_current_walk_state
436 * 435 *
437 * PARAMETERS: thread - Get current active state for this Thread 436 * PARAMETERS: Thread - Get current active state for this Thread
438 * 437 *
439 * RETURN: Pointer to the current walk state 438 * RETURN: Pointer to the current walk state
440 * 439 *
@@ -463,7 +462,7 @@ struct acpi_walk_state *acpi_ds_get_current_walk_state(struct acpi_thread_state
463 * FUNCTION: acpi_ds_push_walk_state 462 * FUNCTION: acpi_ds_push_walk_state
464 * 463 *
465 * PARAMETERS: walk_state - State to push 464 * PARAMETERS: walk_state - State to push
466 * thread - Thread state object 465 * Thread - Thread state object
467 * 466 *
468 * RETURN: None 467 * RETURN: None
469 * 468 *
@@ -487,12 +486,12 @@ acpi_ds_push_walk_state(struct acpi_walk_state *walk_state,
487 * 486 *
488 * FUNCTION: acpi_ds_pop_walk_state 487 * FUNCTION: acpi_ds_pop_walk_state
489 * 488 *
490 * PARAMETERS: thread - Current thread state 489 * PARAMETERS: Thread - Current thread state
491 * 490 *
492 * RETURN: A walk_state object popped from the thread's stack 491 * RETURN: A walk_state object popped from the thread's stack
493 * 492 *
494 * DESCRIPTION: Remove and return the walkstate object that is at the head of 493 * DESCRIPTION: Remove and return the walkstate object that is at the head of
495 * the walk stack for the given walk list. NULL indicates that 494 * the walk stack for the given walk list. NULL indicates that
496 * the list is empty. 495 * the list is empty.
497 * 496 *
498 ******************************************************************************/ 497 ******************************************************************************/
@@ -526,23 +525,20 @@ struct acpi_walk_state *acpi_ds_pop_walk_state(struct acpi_thread_state *thread)
526 * FUNCTION: acpi_ds_create_walk_state 525 * FUNCTION: acpi_ds_create_walk_state
527 * 526 *
528 * PARAMETERS: owner_id - ID for object creation 527 * PARAMETERS: owner_id - ID for object creation
529 * origin - Starting point for this walk 528 * Origin - Starting point for this walk
530 * method_desc - Method object 529 * method_desc - Method object
531 * thread - Current thread state 530 * Thread - Current thread state
532 * 531 *
533 * RETURN: Pointer to the new walk state. 532 * RETURN: Pointer to the new walk state.
534 * 533 *
535 * DESCRIPTION: Allocate and initialize a new walk state. The current walk 534 * DESCRIPTION: Allocate and initialize a new walk state. The current walk
536 * state is set to this new state. 535 * state is set to this new state.
537 * 536 *
538 ******************************************************************************/ 537 ******************************************************************************/
539 538
540struct acpi_walk_state *acpi_ds_create_walk_state(acpi_owner_id owner_id, 539struct acpi_walk_state *acpi_ds_create_walk_state(acpi_owner_id owner_id, union acpi_parse_object
541 union acpi_parse_object 540 *origin, union acpi_operand_object
542 *origin, 541 *method_desc, struct acpi_thread_state
543 union acpi_operand_object
544 *method_desc,
545 struct acpi_thread_state
546 *thread) 542 *thread)
547{ 543{
548 struct acpi_walk_state *walk_state; 544 struct acpi_walk_state *walk_state;
@@ -582,11 +578,11 @@ struct acpi_walk_state *acpi_ds_create_walk_state(acpi_owner_id owner_id,
582 * FUNCTION: acpi_ds_init_aml_walk 578 * FUNCTION: acpi_ds_init_aml_walk
583 * 579 *
584 * PARAMETERS: walk_state - New state to be initialized 580 * PARAMETERS: walk_state - New state to be initialized
585 * op - Current parse op 581 * Op - Current parse op
586 * method_node - Control method NS node, if any 582 * method_node - Control method NS node, if any
587 * aml_start - Start of AML 583 * aml_start - Start of AML
588 * aml_length - Length of AML 584 * aml_length - Length of AML
589 * info - Method info block (params, etc.) 585 * Info - Method info block (params, etc.)
590 * pass_number - 1, 2, or 3 586 * pass_number - 1, 2, or 3
591 * 587 *
592 * RETURN: Status 588 * RETURN: Status
@@ -657,7 +653,7 @@ acpi_ds_init_aml_walk(struct acpi_walk_state *walk_state,
657 /* 653 /*
658 * Setup the current scope. 654 * Setup the current scope.
659 * Find a Named Op that has a namespace node associated with it. 655 * Find a Named Op that has a namespace node associated with it.
660 * search upwards from this Op. Current scope is the first 656 * search upwards from this Op. Current scope is the first
661 * Op with a namespace node. 657 * Op with a namespace node.
662 */ 658 */
663 extra_op = parser_state->start_op; 659 extra_op = parser_state->start_op;
@@ -708,13 +704,13 @@ void acpi_ds_delete_walk_state(struct acpi_walk_state *walk_state)
708 ACPI_FUNCTION_TRACE_PTR(ds_delete_walk_state, walk_state); 704 ACPI_FUNCTION_TRACE_PTR(ds_delete_walk_state, walk_state);
709 705
710 if (!walk_state) { 706 if (!walk_state) {
711 return_VOID; 707 return;
712 } 708 }
713 709
714 if (walk_state->descriptor_type != ACPI_DESC_TYPE_WALK) { 710 if (walk_state->descriptor_type != ACPI_DESC_TYPE_WALK) {
715 ACPI_ERROR((AE_INFO, "%p is not a valid walk state", 711 ACPI_ERROR((AE_INFO, "%p is not a valid walk state",
716 walk_state)); 712 walk_state));
717 return_VOID; 713 return;
718 } 714 }
719 715
720 /* There should not be any open scopes */ 716 /* There should not be any open scopes */