diff options
Diffstat (limited to 'drivers/acpi/dispatcher/dsmthdat.c')
| -rw-r--r-- | drivers/acpi/dispatcher/dsmthdat.c | 43 |
1 files changed, 22 insertions, 21 deletions
diff --git a/drivers/acpi/dispatcher/dsmthdat.c b/drivers/acpi/dispatcher/dsmthdat.c index c025674f938b..459160ff9058 100644 --- a/drivers/acpi/dispatcher/dsmthdat.c +++ b/drivers/acpi/dispatcher/dsmthdat.c | |||
| @@ -81,7 +81,7 @@ acpi_ds_method_data_get_type(u16 opcode, | |||
| 81 | * special data types. | 81 | * special data types. |
| 82 | * | 82 | * |
| 83 | * NOTES: walk_state fields are initialized to zero by the | 83 | * NOTES: walk_state fields are initialized to zero by the |
| 84 | * ACPI_MEM_CALLOCATE(). | 84 | * ACPI_ALLOCATE_ZEROED(). |
| 85 | * | 85 | * |
| 86 | * A pseudo-Namespace Node is assigned to each argument and local | 86 | * A pseudo-Namespace Node is assigned to each argument and local |
| 87 | * so that ref_of() can return a pointer to the Node. | 87 | * so that ref_of() can return a pointer to the Node. |
| @@ -92,7 +92,7 @@ void acpi_ds_method_data_init(struct acpi_walk_state *walk_state) | |||
| 92 | { | 92 | { |
| 93 | u32 i; | 93 | u32 i; |
| 94 | 94 | ||
| 95 | ACPI_FUNCTION_TRACE("ds_method_data_init"); | 95 | ACPI_FUNCTION_TRACE(ds_method_data_init); |
| 96 | 96 | ||
| 97 | /* Init the method arguments */ | 97 | /* Init the method arguments */ |
| 98 | 98 | ||
| @@ -100,10 +100,10 @@ void acpi_ds_method_data_init(struct acpi_walk_state *walk_state) | |||
| 100 | ACPI_MOVE_32_TO_32(&walk_state->arguments[i].name, | 100 | ACPI_MOVE_32_TO_32(&walk_state->arguments[i].name, |
| 101 | NAMEOF_ARG_NTE); | 101 | NAMEOF_ARG_NTE); |
| 102 | walk_state->arguments[i].name.integer |= (i << 24); | 102 | walk_state->arguments[i].name.integer |= (i << 24); |
| 103 | walk_state->arguments[i].descriptor = ACPI_DESC_TYPE_NAMED; | 103 | walk_state->arguments[i].descriptor_type = ACPI_DESC_TYPE_NAMED; |
| 104 | walk_state->arguments[i].type = ACPI_TYPE_ANY; | 104 | walk_state->arguments[i].type = ACPI_TYPE_ANY; |
| 105 | walk_state->arguments[i].flags = ANOBJ_END_OF_PEER_LIST | | 105 | walk_state->arguments[i].flags = |
| 106 | ANOBJ_METHOD_ARG; | 106 | ANOBJ_END_OF_PEER_LIST | ANOBJ_METHOD_ARG; |
| 107 | } | 107 | } |
| 108 | 108 | ||
| 109 | /* Init the method locals */ | 109 | /* Init the method locals */ |
| @@ -113,11 +113,11 @@ void acpi_ds_method_data_init(struct acpi_walk_state *walk_state) | |||
| 113 | NAMEOF_LOCAL_NTE); | 113 | NAMEOF_LOCAL_NTE); |
| 114 | 114 | ||
| 115 | walk_state->local_variables[i].name.integer |= (i << 24); | 115 | walk_state->local_variables[i].name.integer |= (i << 24); |
| 116 | walk_state->local_variables[i].descriptor = | 116 | walk_state->local_variables[i].descriptor_type = |
| 117 | ACPI_DESC_TYPE_NAMED; | 117 | ACPI_DESC_TYPE_NAMED; |
| 118 | walk_state->local_variables[i].type = ACPI_TYPE_ANY; | 118 | walk_state->local_variables[i].type = ACPI_TYPE_ANY; |
| 119 | walk_state->local_variables[i].flags = ANOBJ_END_OF_PEER_LIST | | 119 | walk_state->local_variables[i].flags = |
| 120 | ANOBJ_METHOD_LOCAL; | 120 | ANOBJ_END_OF_PEER_LIST | ANOBJ_METHOD_LOCAL; |
| 121 | } | 121 | } |
| 122 | 122 | ||
| 123 | return_VOID; | 123 | return_VOID; |
| @@ -140,7 +140,7 @@ void acpi_ds_method_data_delete_all(struct acpi_walk_state *walk_state) | |||
| 140 | { | 140 | { |
| 141 | u32 index; | 141 | u32 index; |
| 142 | 142 | ||
| 143 | ACPI_FUNCTION_TRACE("ds_method_data_delete_all"); | 143 | ACPI_FUNCTION_TRACE(ds_method_data_delete_all); |
| 144 | 144 | ||
| 145 | /* Detach the locals */ | 145 | /* Detach the locals */ |
| 146 | 146 | ||
| @@ -199,7 +199,7 @@ acpi_ds_method_data_init_args(union acpi_operand_object **params, | |||
| 199 | acpi_status status; | 199 | acpi_status status; |
| 200 | u32 index = 0; | 200 | u32 index = 0; |
| 201 | 201 | ||
| 202 | ACPI_FUNCTION_TRACE_PTR("ds_method_data_init_args", params); | 202 | ACPI_FUNCTION_TRACE_PTR(ds_method_data_init_args, params); |
| 203 | 203 | ||
| 204 | if (!params) { | 204 | if (!params) { |
| 205 | ACPI_DEBUG_PRINT((ACPI_DB_EXEC, | 205 | ACPI_DEBUG_PRINT((ACPI_DB_EXEC, |
| @@ -251,7 +251,7 @@ acpi_ds_method_data_get_node(u16 opcode, | |||
| 251 | struct acpi_walk_state *walk_state, | 251 | struct acpi_walk_state *walk_state, |
| 252 | struct acpi_namespace_node **node) | 252 | struct acpi_namespace_node **node) |
| 253 | { | 253 | { |
| 254 | ACPI_FUNCTION_TRACE("ds_method_data_get_node"); | 254 | ACPI_FUNCTION_TRACE(ds_method_data_get_node); |
| 255 | 255 | ||
| 256 | /* | 256 | /* |
| 257 | * Method Locals and Arguments are supported | 257 | * Method Locals and Arguments are supported |
| @@ -318,10 +318,10 @@ acpi_ds_method_data_set_value(u16 opcode, | |||
| 318 | acpi_status status; | 318 | acpi_status status; |
| 319 | struct acpi_namespace_node *node; | 319 | struct acpi_namespace_node *node; |
| 320 | 320 | ||
| 321 | ACPI_FUNCTION_TRACE("ds_method_data_set_value"); | 321 | ACPI_FUNCTION_TRACE(ds_method_data_set_value); |
| 322 | 322 | ||
| 323 | ACPI_DEBUG_PRINT((ACPI_DB_EXEC, | 323 | ACPI_DEBUG_PRINT((ACPI_DB_EXEC, |
| 324 | "new_obj %p Opcode %X, Refs=%d [%s]\n", object, | 324 | "NewObj %p Opcode %X, Refs=%d [%s]\n", object, |
| 325 | opcode, object->common.reference_count, | 325 | opcode, object->common.reference_count, |
| 326 | acpi_ut_get_type_name(object->common.type))); | 326 | acpi_ut_get_type_name(object->common.type))); |
| 327 | 327 | ||
| @@ -336,7 +336,7 @@ acpi_ds_method_data_set_value(u16 opcode, | |||
| 336 | * Increment ref count so object can't be deleted while installed. | 336 | * Increment ref count so object can't be deleted while installed. |
| 337 | * NOTE: We do not copy the object in order to preserve the call by | 337 | * NOTE: We do not copy the object in order to preserve the call by |
| 338 | * reference semantics of ACPI Control Method invocation. | 338 | * reference semantics of ACPI Control Method invocation. |
| 339 | * (See ACPI specification 2.0_c) | 339 | * (See ACPI Specification 2.0_c) |
| 340 | */ | 340 | */ |
| 341 | acpi_ut_add_reference(object); | 341 | acpi_ut_add_reference(object); |
| 342 | 342 | ||
| @@ -351,7 +351,7 @@ acpi_ds_method_data_set_value(u16 opcode, | |||
| 351 | * FUNCTION: acpi_ds_method_data_get_value | 351 | * FUNCTION: acpi_ds_method_data_get_value |
| 352 | * | 352 | * |
| 353 | * PARAMETERS: Opcode - Either AML_LOCAL_OP or AML_ARG_OP | 353 | * PARAMETERS: Opcode - Either AML_LOCAL_OP or AML_ARG_OP |
| 354 | * Index - which local_var or argument to get | 354 | * Index - Which local_var or argument to get |
| 355 | * walk_state - Current walk state object | 355 | * walk_state - Current walk state object |
| 356 | * dest_desc - Where Arg or Local value is returned | 356 | * dest_desc - Where Arg or Local value is returned |
| 357 | * | 357 | * |
| @@ -372,7 +372,7 @@ acpi_ds_method_data_get_value(u16 opcode, | |||
| 372 | struct acpi_namespace_node *node; | 372 | struct acpi_namespace_node *node; |
| 373 | union acpi_operand_object *object; | 373 | union acpi_operand_object *object; |
| 374 | 374 | ||
| 375 | ACPI_FUNCTION_TRACE("ds_method_data_get_value"); | 375 | ACPI_FUNCTION_TRACE(ds_method_data_get_value); |
| 376 | 376 | ||
| 377 | /* Validate the object descriptor */ | 377 | /* Validate the object descriptor */ |
| 378 | 378 | ||
| @@ -459,7 +459,7 @@ acpi_ds_method_data_get_value(u16 opcode, | |||
| 459 | * FUNCTION: acpi_ds_method_data_delete_value | 459 | * FUNCTION: acpi_ds_method_data_delete_value |
| 460 | * | 460 | * |
| 461 | * PARAMETERS: Opcode - Either AML_LOCAL_OP or AML_ARG_OP | 461 | * PARAMETERS: Opcode - Either AML_LOCAL_OP or AML_ARG_OP |
| 462 | * Index - which local_var or argument to delete | 462 | * Index - Which local_var or argument to delete |
| 463 | * walk_state - Current walk state object | 463 | * walk_state - Current walk state object |
| 464 | * | 464 | * |
| 465 | * RETURN: None | 465 | * RETURN: None |
| @@ -477,7 +477,7 @@ acpi_ds_method_data_delete_value(u16 opcode, | |||
| 477 | struct acpi_namespace_node *node; | 477 | struct acpi_namespace_node *node; |
| 478 | union acpi_operand_object *object; | 478 | union acpi_operand_object *object; |
| 479 | 479 | ||
| 480 | ACPI_FUNCTION_TRACE("ds_method_data_delete_value"); | 480 | ACPI_FUNCTION_TRACE(ds_method_data_delete_value); |
| 481 | 481 | ||
| 482 | /* Get the namespace node for the arg/local */ | 482 | /* Get the namespace node for the arg/local */ |
| 483 | 483 | ||
| @@ -538,7 +538,7 @@ acpi_ds_store_object_to_local(u16 opcode, | |||
| 538 | union acpi_operand_object *current_obj_desc; | 538 | union acpi_operand_object *current_obj_desc; |
| 539 | union acpi_operand_object *new_obj_desc; | 539 | union acpi_operand_object *new_obj_desc; |
| 540 | 540 | ||
| 541 | ACPI_FUNCTION_TRACE("ds_store_object_to_local"); | 541 | ACPI_FUNCTION_TRACE(ds_store_object_to_local); |
| 542 | ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "Opcode=%X Index=%d Obj=%p\n", | 542 | ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "Opcode=%X Index=%d Obj=%p\n", |
| 543 | opcode, index, obj_desc)); | 543 | opcode, index, obj_desc)); |
| 544 | 544 | ||
| @@ -614,7 +614,7 @@ acpi_ds_store_object_to_local(u16 opcode, | |||
| 614 | && (current_obj_desc->reference.opcode == | 614 | && (current_obj_desc->reference.opcode == |
| 615 | AML_REF_OF_OP)) { | 615 | AML_REF_OF_OP)) { |
| 616 | ACPI_DEBUG_PRINT((ACPI_DB_EXEC, | 616 | ACPI_DEBUG_PRINT((ACPI_DB_EXEC, |
| 617 | "Arg (%p) is an obj_ref(Node), storing in node %p\n", | 617 | "Arg (%p) is an ObjRef(Node), storing in node %p\n", |
| 618 | new_obj_desc, | 618 | new_obj_desc, |
| 619 | current_obj_desc)); | 619 | current_obj_desc)); |
| 620 | 620 | ||
| @@ -688,7 +688,7 @@ acpi_ds_method_data_get_type(u16 opcode, | |||
| 688 | struct acpi_namespace_node *node; | 688 | struct acpi_namespace_node *node; |
| 689 | union acpi_operand_object *object; | 689 | union acpi_operand_object *object; |
| 690 | 690 | ||
| 691 | ACPI_FUNCTION_TRACE("ds_method_data_get_type"); | 691 | ACPI_FUNCTION_TRACE(ds_method_data_get_type); |
| 692 | 692 | ||
| 693 | /* Get the namespace node for the arg/local */ | 693 | /* Get the namespace node for the arg/local */ |
| 694 | 694 | ||
| @@ -701,6 +701,7 @@ acpi_ds_method_data_get_type(u16 opcode, | |||
| 701 | 701 | ||
| 702 | object = acpi_ns_get_attached_object(node); | 702 | object = acpi_ns_get_attached_object(node); |
| 703 | if (!object) { | 703 | if (!object) { |
| 704 | |||
| 704 | /* Uninitialized local/arg, return TYPE_ANY */ | 705 | /* Uninitialized local/arg, return TYPE_ANY */ |
| 705 | 706 | ||
| 706 | return_VALUE(ACPI_TYPE_ANY); | 707 | return_VALUE(ACPI_TYPE_ANY); |
