diff options
Diffstat (limited to 'drivers/acpi/dispatcher/dsmthdat.c')
-rw-r--r-- | drivers/acpi/dispatcher/dsmthdat.c | 424 |
1 files changed, 194 insertions, 230 deletions
diff --git a/drivers/acpi/dispatcher/dsmthdat.c b/drivers/acpi/dispatcher/dsmthdat.c index f7998306f75..4095ce70982 100644 --- a/drivers/acpi/dispatcher/dsmthdat.c +++ b/drivers/acpi/dispatcher/dsmthdat.c @@ -41,41 +41,32 @@ * POSSIBILITY OF SUCH DAMAGES. */ - #include <acpi/acpi.h> #include <acpi/acdispat.h> #include <acpi/amlcode.h> #include <acpi/acnamesp.h> #include <acpi/acinterp.h> - #define _COMPONENT ACPI_DISPATCHER - ACPI_MODULE_NAME ("dsmthdat") +ACPI_MODULE_NAME("dsmthdat") /* Local prototypes */ - static void -acpi_ds_method_data_delete_value ( - u16 opcode, - u32 index, - struct acpi_walk_state *walk_state); +acpi_ds_method_data_delete_value(u16 opcode, + u32 index, struct acpi_walk_state *walk_state); static acpi_status -acpi_ds_method_data_set_value ( - u16 opcode, - u32 index, - union acpi_operand_object *object, - struct acpi_walk_state *walk_state); +acpi_ds_method_data_set_value(u16 opcode, + u32 index, + union acpi_operand_object *object, + struct acpi_walk_state *walk_state); #ifdef ACPI_OBSOLETE_FUNCTIONS acpi_object_type -acpi_ds_method_data_get_type ( - u16 opcode, - u32 index, - struct acpi_walk_state *walk_state); +acpi_ds_method_data_get_type(u16 opcode, + u32 index, struct acpi_walk_state *walk_state); #endif - /******************************************************************************* * * FUNCTION: acpi_ds_method_data_init @@ -97,45 +88,41 @@ acpi_ds_method_data_get_type ( * ******************************************************************************/ -void -acpi_ds_method_data_init ( - struct acpi_walk_state *walk_state) +void acpi_ds_method_data_init(struct acpi_walk_state *walk_state) { - u32 i; - - - ACPI_FUNCTION_TRACE ("ds_method_data_init"); + u32 i; + ACPI_FUNCTION_TRACE("ds_method_data_init"); /* Init the method arguments */ for (i = 0; i < ACPI_METHOD_NUM_ARGS; i++) { - ACPI_MOVE_32_TO_32 (&walk_state->arguments[i].name, + ACPI_MOVE_32_TO_32(&walk_state->arguments[i].name, NAMEOF_ARG_NTE); walk_state->arguments[i].name.integer |= (i << 24); - walk_state->arguments[i].descriptor = ACPI_DESC_TYPE_NAMED; - walk_state->arguments[i].type = ACPI_TYPE_ANY; - walk_state->arguments[i].flags = ANOBJ_END_OF_PEER_LIST | - ANOBJ_METHOD_ARG; + walk_state->arguments[i].descriptor = ACPI_DESC_TYPE_NAMED; + walk_state->arguments[i].type = ACPI_TYPE_ANY; + walk_state->arguments[i].flags = ANOBJ_END_OF_PEER_LIST | + ANOBJ_METHOD_ARG; } /* Init the method locals */ for (i = 0; i < ACPI_METHOD_NUM_LOCALS; i++) { - ACPI_MOVE_32_TO_32 (&walk_state->local_variables[i].name, + ACPI_MOVE_32_TO_32(&walk_state->local_variables[i].name, NAMEOF_LOCAL_NTE); walk_state->local_variables[i].name.integer |= (i << 24); - walk_state->local_variables[i].descriptor = ACPI_DESC_TYPE_NAMED; - walk_state->local_variables[i].type = ACPI_TYPE_ANY; - walk_state->local_variables[i].flags = ANOBJ_END_OF_PEER_LIST | - ANOBJ_METHOD_LOCAL; + walk_state->local_variables[i].descriptor = + ACPI_DESC_TYPE_NAMED; + walk_state->local_variables[i].type = ACPI_TYPE_ANY; + walk_state->local_variables[i].flags = ANOBJ_END_OF_PEER_LIST | + ANOBJ_METHOD_LOCAL; } return_VOID; } - /******************************************************************************* * * FUNCTION: acpi_ds_method_data_delete_all @@ -149,26 +136,25 @@ acpi_ds_method_data_init ( * ******************************************************************************/ -void -acpi_ds_method_data_delete_all ( - struct acpi_walk_state *walk_state) +void acpi_ds_method_data_delete_all(struct acpi_walk_state *walk_state) { - u32 index; - - - ACPI_FUNCTION_TRACE ("ds_method_data_delete_all"); + u32 index; + ACPI_FUNCTION_TRACE("ds_method_data_delete_all"); /* Detach the locals */ for (index = 0; index < ACPI_METHOD_NUM_LOCALS; index++) { if (walk_state->local_variables[index].object) { - ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Deleting Local%d=%p\n", - index, walk_state->local_variables[index].object)); + ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "Deleting Local%d=%p\n", + index, + walk_state->local_variables[index]. + object)); /* Detach object (if present) and remove a reference */ - acpi_ns_detach_object (&walk_state->local_variables[index]); + acpi_ns_detach_object(&walk_state-> + local_variables[index]); } } @@ -176,19 +162,19 @@ acpi_ds_method_data_delete_all ( for (index = 0; index < ACPI_METHOD_NUM_ARGS; index++) { if (walk_state->arguments[index].object) { - ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Deleting Arg%d=%p\n", - index, walk_state->arguments[index].object)); + ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "Deleting Arg%d=%p\n", + index, + walk_state->arguments[index].object)); /* Detach object (if present) and remove a reference */ - acpi_ns_detach_object (&walk_state->arguments[index]); + acpi_ns_detach_object(&walk_state->arguments[index]); } } return_VOID; } - /******************************************************************************* * * FUNCTION: acpi_ds_method_data_init_args @@ -206,47 +192,44 @@ acpi_ds_method_data_delete_all ( ******************************************************************************/ acpi_status -acpi_ds_method_data_init_args ( - union acpi_operand_object **params, - u32 max_param_count, - struct acpi_walk_state *walk_state) +acpi_ds_method_data_init_args(union acpi_operand_object **params, + u32 max_param_count, + struct acpi_walk_state *walk_state) { - acpi_status status; - u32 index = 0; - - - ACPI_FUNCTION_TRACE_PTR ("ds_method_data_init_args", params); + acpi_status status; + u32 index = 0; + ACPI_FUNCTION_TRACE_PTR("ds_method_data_init_args", params); if (!params) { - ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "No param list passed to method\n")); - return_ACPI_STATUS (AE_OK); + ACPI_DEBUG_PRINT((ACPI_DB_EXEC, + "No param list passed to method\n")); + return_ACPI_STATUS(AE_OK); } /* Copy passed parameters into the new method stack frame */ while ((index < ACPI_METHOD_NUM_ARGS) && - (index < max_param_count) && - params[index]) { + (index < max_param_count) && params[index]) { /* * A valid parameter. * Store the argument in the method/walk descriptor. * Do not copy the arg in order to implement call by reference */ - status = acpi_ds_method_data_set_value (AML_ARG_OP, index, - params[index], walk_state); - if (ACPI_FAILURE (status)) { - return_ACPI_STATUS (status); + status = acpi_ds_method_data_set_value(AML_ARG_OP, index, + params[index], + walk_state); + if (ACPI_FAILURE(status)) { + return_ACPI_STATUS(status); } index++; } - ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "%d args passed to method\n", index)); - return_ACPI_STATUS (AE_OK); + ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "%d args passed to method\n", index)); + return_ACPI_STATUS(AE_OK); } - /******************************************************************************* * * FUNCTION: acpi_ds_method_data_get_node @@ -263,14 +246,12 @@ acpi_ds_method_data_init_args ( ******************************************************************************/ acpi_status -acpi_ds_method_data_get_node ( - u16 opcode, - u32 index, - struct acpi_walk_state *walk_state, - struct acpi_namespace_node **node) +acpi_ds_method_data_get_node(u16 opcode, + u32 index, + struct acpi_walk_state *walk_state, + struct acpi_namespace_node **node) { - ACPI_FUNCTION_TRACE ("ds_method_data_get_node"); - + ACPI_FUNCTION_TRACE("ds_method_data_get_node"); /* * Method Locals and Arguments are supported @@ -279,10 +260,10 @@ acpi_ds_method_data_get_node ( case AML_LOCAL_OP: if (index > ACPI_METHOD_MAX_LOCAL) { - ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, - "Local index %d is invalid (max %d)\n", - index, ACPI_METHOD_MAX_LOCAL)); - return_ACPI_STATUS (AE_AML_INVALID_INDEX); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Local index %d is invalid (max %d)\n", + index, ACPI_METHOD_MAX_LOCAL)); + return_ACPI_STATUS(AE_AML_INVALID_INDEX); } /* Return a pointer to the pseudo-node */ @@ -293,10 +274,10 @@ acpi_ds_method_data_get_node ( case AML_ARG_OP: if (index > ACPI_METHOD_MAX_ARG) { - ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, - "Arg index %d is invalid (max %d)\n", - index, ACPI_METHOD_MAX_ARG)); - return_ACPI_STATUS (AE_AML_INVALID_INDEX); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Arg index %d is invalid (max %d)\n", + index, ACPI_METHOD_MAX_ARG)); + return_ACPI_STATUS(AE_AML_INVALID_INDEX); } /* Return a pointer to the pseudo-node */ @@ -305,14 +286,14 @@ acpi_ds_method_data_get_node ( break; default: - ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Opcode %d is invalid\n", opcode)); - return_ACPI_STATUS (AE_AML_BAD_OPCODE); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Opcode %d is invalid\n", + opcode)); + return_ACPI_STATUS(AE_AML_BAD_OPCODE); } - return_ACPI_STATUS (AE_OK); + return_ACPI_STATUS(AE_OK); } - /******************************************************************************* * * FUNCTION: acpi_ds_method_data_set_value @@ -330,29 +311,26 @@ acpi_ds_method_data_get_node ( ******************************************************************************/ static acpi_status -acpi_ds_method_data_set_value ( - u16 opcode, - u32 index, - union acpi_operand_object *object, - struct acpi_walk_state *walk_state) +acpi_ds_method_data_set_value(u16 opcode, + u32 index, + union acpi_operand_object *object, + struct acpi_walk_state *walk_state) { - acpi_status status; - struct acpi_namespace_node *node; - + acpi_status status; + struct acpi_namespace_node *node; - ACPI_FUNCTION_TRACE ("ds_method_data_set_value"); + ACPI_FUNCTION_TRACE("ds_method_data_set_value"); - - ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, - "new_obj %p Opcode %X, Refs=%d [%s]\n", object, - opcode, object->common.reference_count, - acpi_ut_get_type_name (object->common.type))); + ACPI_DEBUG_PRINT((ACPI_DB_EXEC, + "new_obj %p Opcode %X, Refs=%d [%s]\n", object, + opcode, object->common.reference_count, + acpi_ut_get_type_name(object->common.type))); /* Get the namespace node for the arg/local */ - status = acpi_ds_method_data_get_node (opcode, index, walk_state, &node); - if (ACPI_FAILURE (status)) { - return_ACPI_STATUS (status); + status = acpi_ds_method_data_get_node(opcode, index, walk_state, &node); + if (ACPI_FAILURE(status)) { + return_ACPI_STATUS(status); } /* @@ -361,15 +339,14 @@ acpi_ds_method_data_set_value ( * reference semantics of ACPI Control Method invocation. * (See ACPI specification 2.0_c) */ - acpi_ut_add_reference (object); + acpi_ut_add_reference(object); /* Install the object */ node->object = object; - return_ACPI_STATUS (status); + return_ACPI_STATUS(status); } - /******************************************************************************* * * FUNCTION: acpi_ds_method_data_get_value @@ -387,32 +364,30 @@ acpi_ds_method_data_set_value ( ******************************************************************************/ acpi_status -acpi_ds_method_data_get_value ( - u16 opcode, - u32 index, - struct acpi_walk_state *walk_state, - union acpi_operand_object **dest_desc) +acpi_ds_method_data_get_value(u16 opcode, + u32 index, + struct acpi_walk_state *walk_state, + union acpi_operand_object **dest_desc) { - acpi_status status; - struct acpi_namespace_node *node; - union acpi_operand_object *object; - - - ACPI_FUNCTION_TRACE ("ds_method_data_get_value"); + acpi_status status; + struct acpi_namespace_node *node; + union acpi_operand_object *object; + ACPI_FUNCTION_TRACE("ds_method_data_get_value"); /* Validate the object descriptor */ if (!dest_desc) { - ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Null object descriptor pointer\n")); - return_ACPI_STATUS (AE_BAD_PARAMETER); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Null object descriptor pointer\n")); + return_ACPI_STATUS(AE_BAD_PARAMETER); } /* Get the namespace node for the arg/local */ - status = acpi_ds_method_data_get_node (opcode, index, walk_state, &node); - if (ACPI_FAILURE (status)) { - return_ACPI_STATUS (status); + status = acpi_ds_method_data_get_node(opcode, index, walk_state, &node); + if (ACPI_FAILURE(status)) { + return_ACPI_STATUS(status); } /* Get the object from the node */ @@ -433,9 +408,10 @@ acpi_ds_method_data_get_value ( /* If slack enabled, init the local_x/arg_x to an Integer of value zero */ if (acpi_gbl_enable_interpreter_slack) { - object = acpi_ut_create_internal_object (ACPI_TYPE_INTEGER); + object = + acpi_ut_create_internal_object(ACPI_TYPE_INTEGER); if (!object) { - return_ACPI_STATUS (AE_NO_MEMORY); + return_ACPI_STATUS(AE_NO_MEMORY); } object->integer.value = 0; @@ -444,27 +420,29 @@ acpi_ds_method_data_get_value ( /* Otherwise, return the error */ - else switch (opcode) { - case AML_ARG_OP: + else + switch (opcode) { + case AML_ARG_OP: - ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, - "Uninitialized Arg[%d] at node %p\n", - index, node)); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Uninitialized Arg[%d] at node %p\n", + index, node)); - return_ACPI_STATUS (AE_AML_UNINITIALIZED_ARG); + return_ACPI_STATUS(AE_AML_UNINITIALIZED_ARG); - case AML_LOCAL_OP: + case AML_LOCAL_OP: - ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, - "Uninitialized Local[%d] at node %p\n", - index, node)); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Uninitialized Local[%d] at node %p\n", + index, node)); - return_ACPI_STATUS (AE_AML_UNINITIALIZED_LOCAL); + return_ACPI_STATUS(AE_AML_UNINITIALIZED_LOCAL); - default: - ACPI_REPORT_ERROR (("Not Arg/Local opcode: %X\n", opcode)); - return_ACPI_STATUS (AE_AML_INTERNAL); - } + default: + ACPI_REPORT_ERROR(("Not Arg/Local opcode: %X\n", + opcode)); + return_ACPI_STATUS(AE_AML_INTERNAL); + } } /* @@ -472,12 +450,11 @@ acpi_ds_method_data_get_value ( * Return an additional reference to the object */ *dest_desc = object; - acpi_ut_add_reference (object); + acpi_ut_add_reference(object); - return_ACPI_STATUS (AE_OK); + return_ACPI_STATUS(AE_OK); } - /******************************************************************************* * * FUNCTION: acpi_ds_method_data_delete_value @@ -494,29 +471,25 @@ acpi_ds_method_data_get_value ( ******************************************************************************/ static void -acpi_ds_method_data_delete_value ( - u16 opcode, - u32 index, - struct acpi_walk_state *walk_state) +acpi_ds_method_data_delete_value(u16 opcode, + u32 index, struct acpi_walk_state *walk_state) { - acpi_status status; - struct acpi_namespace_node *node; - union acpi_operand_object *object; - - - ACPI_FUNCTION_TRACE ("ds_method_data_delete_value"); + acpi_status status; + struct acpi_namespace_node *node; + union acpi_operand_object *object; + ACPI_FUNCTION_TRACE("ds_method_data_delete_value"); /* Get the namespace node for the arg/local */ - status = acpi_ds_method_data_get_node (opcode, index, walk_state, &node); - if (ACPI_FAILURE (status)) { + status = acpi_ds_method_data_get_node(opcode, index, walk_state, &node); + if (ACPI_FAILURE(status)) { return_VOID; } /* Get the associated object */ - object = acpi_ns_get_attached_object (node); + object = acpi_ns_get_attached_object(node); /* * Undefine the Arg or Local by setting its descriptor @@ -526,19 +499,18 @@ acpi_ds_method_data_delete_value ( node->object = NULL; if ((object) && - (ACPI_GET_DESCRIPTOR_TYPE (object) == ACPI_DESC_TYPE_OPERAND)) { + (ACPI_GET_DESCRIPTOR_TYPE(object) == ACPI_DESC_TYPE_OPERAND)) { /* * There is a valid object. * Decrement the reference count by one to balance the * increment when the object was stored. */ - acpi_ut_remove_reference (object); + acpi_ut_remove_reference(object); } return_VOID; } - /******************************************************************************* * * FUNCTION: acpi_ds_store_object_to_local @@ -557,40 +529,38 @@ acpi_ds_method_data_delete_value ( ******************************************************************************/ acpi_status -acpi_ds_store_object_to_local ( - u16 opcode, - u32 index, - union acpi_operand_object *obj_desc, - struct acpi_walk_state *walk_state) +acpi_ds_store_object_to_local(u16 opcode, + u32 index, + union acpi_operand_object *obj_desc, + struct acpi_walk_state *walk_state) { - acpi_status status; - struct acpi_namespace_node *node; - union acpi_operand_object *current_obj_desc; - union acpi_operand_object *new_obj_desc; - + acpi_status status; + struct acpi_namespace_node *node; + union acpi_operand_object *current_obj_desc; + union acpi_operand_object *new_obj_desc; - ACPI_FUNCTION_TRACE ("ds_store_object_to_local"); - ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Opcode=%X Index=%d Obj=%p\n", - opcode, index, obj_desc)); + ACPI_FUNCTION_TRACE("ds_store_object_to_local"); + ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "Opcode=%X Index=%d Obj=%p\n", + opcode, index, obj_desc)); /* Parameter validation */ if (!obj_desc) { - return_ACPI_STATUS (AE_BAD_PARAMETER); + return_ACPI_STATUS(AE_BAD_PARAMETER); } /* Get the namespace node for the arg/local */ - status = acpi_ds_method_data_get_node (opcode, index, walk_state, &node); - if (ACPI_FAILURE (status)) { - return_ACPI_STATUS (status); + status = acpi_ds_method_data_get_node(opcode, index, walk_state, &node); + if (ACPI_FAILURE(status)) { + return_ACPI_STATUS(status); } - current_obj_desc = acpi_ns_get_attached_object (node); + current_obj_desc = acpi_ns_get_attached_object(node); if (current_obj_desc == obj_desc) { - ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Obj=%p already installed!\n", - obj_desc)); - return_ACPI_STATUS (status); + ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "Obj=%p already installed!\n", + obj_desc)); + return_ACPI_STATUS(status); } /* @@ -602,9 +572,11 @@ acpi_ds_store_object_to_local ( */ new_obj_desc = obj_desc; if (obj_desc->common.reference_count > 1) { - status = acpi_ut_copy_iobject_to_iobject (obj_desc, &new_obj_desc, walk_state); - if (ACPI_FAILURE (status)) { - return_ACPI_STATUS (status); + status = + acpi_ut_copy_iobject_to_iobject(obj_desc, &new_obj_desc, + walk_state); + if (ACPI_FAILURE(status)) { + return_ACPI_STATUS(status); } } @@ -633,42 +605,39 @@ acpi_ds_store_object_to_local ( */ if (opcode == AML_ARG_OP) { /* - * Make sure that the object is the correct type. This may be - * overkill, butit is here because references were NS nodes in - * the past. Now they are operand objects of type Reference. - */ - if (ACPI_GET_DESCRIPTOR_TYPE (current_obj_desc) != ACPI_DESC_TYPE_OPERAND) { - ACPI_REPORT_ERROR (( - "Invalid descriptor type while storing to method arg: [%s]\n", - acpi_ut_get_descriptor_name (current_obj_desc))); - return_ACPI_STATUS (AE_AML_INTERNAL); - } - - /* * If we have a valid reference object that came from ref_of(), * do the indirect store */ - if ((current_obj_desc->common.type == ACPI_TYPE_LOCAL_REFERENCE) && - (current_obj_desc->reference.opcode == AML_REF_OF_OP)) { - ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, - "Arg (%p) is an obj_ref(Node), storing in node %p\n", - new_obj_desc, current_obj_desc)); + if ((ACPI_GET_DESCRIPTOR_TYPE(current_obj_desc) == + ACPI_DESC_TYPE_OPERAND) + && (current_obj_desc->common.type == + ACPI_TYPE_LOCAL_REFERENCE) + && (current_obj_desc->reference.opcode == + AML_REF_OF_OP)) { + ACPI_DEBUG_PRINT((ACPI_DB_EXEC, + "Arg (%p) is an obj_ref(Node), storing in node %p\n", + new_obj_desc, + current_obj_desc)); /* * Store this object to the Node (perform the indirect store) * NOTE: No implicit conversion is performed, as per the ACPI * specification rules on storing to Locals/Args. */ - status = acpi_ex_store_object_to_node (new_obj_desc, - current_obj_desc->reference.object, walk_state, - ACPI_NO_IMPLICIT_CONVERSION); + status = + acpi_ex_store_object_to_node(new_obj_desc, + current_obj_desc-> + reference. + object, + walk_state, + ACPI_NO_IMPLICIT_CONVERSION); /* Remove local reference if we copied the object above */ if (new_obj_desc != obj_desc) { - acpi_ut_remove_reference (new_obj_desc); + acpi_ut_remove_reference(new_obj_desc); } - return_ACPI_STATUS (status); + return_ACPI_STATUS(status); } } @@ -676,7 +645,7 @@ acpi_ds_store_object_to_local ( * Delete the existing object * before storing the new one */ - acpi_ds_method_data_delete_value (opcode, index, walk_state); + acpi_ds_method_data_delete_value(opcode, index, walk_state); } /* @@ -684,18 +653,19 @@ acpi_ds_store_object_to_local ( * the descriptor for the Arg or Local. * (increments the object reference count by one) */ - status = acpi_ds_method_data_set_value (opcode, index, new_obj_desc, walk_state); + status = + acpi_ds_method_data_set_value(opcode, index, new_obj_desc, + walk_state); /* Remove local reference if we copied the object above */ if (new_obj_desc != obj_desc) { - acpi_ut_remove_reference (new_obj_desc); + acpi_ut_remove_reference(new_obj_desc); } - return_ACPI_STATUS (status); + return_ACPI_STATUS(status); } - #ifdef ACPI_OBSOLETE_FUNCTIONS /******************************************************************************* * @@ -712,39 +682,33 @@ acpi_ds_store_object_to_local ( ******************************************************************************/ acpi_object_type -acpi_ds_method_data_get_type ( - u16 opcode, - u32 index, - struct acpi_walk_state *walk_state) +acpi_ds_method_data_get_type(u16 opcode, + u32 index, struct acpi_walk_state *walk_state) { - acpi_status status; - struct acpi_namespace_node *node; - union acpi_operand_object *object; - - - ACPI_FUNCTION_TRACE ("ds_method_data_get_type"); + acpi_status status; + struct acpi_namespace_node *node; + union acpi_operand_object *object; + ACPI_FUNCTION_TRACE("ds_method_data_get_type"); /* Get the namespace node for the arg/local */ - status = acpi_ds_method_data_get_node (opcode, index, walk_state, &node); - if (ACPI_FAILURE (status)) { - return_VALUE ((ACPI_TYPE_NOT_FOUND)); + status = acpi_ds_method_data_get_node(opcode, index, walk_state, &node); + if (ACPI_FAILURE(status)) { + return_VALUE((ACPI_TYPE_NOT_FOUND)); } /* Get the object */ - object = acpi_ns_get_attached_object (node); + object = acpi_ns_get_attached_object(node); if (!object) { /* Uninitialized local/arg, return TYPE_ANY */ - return_VALUE (ACPI_TYPE_ANY); + return_VALUE(ACPI_TYPE_ANY); } /* Get the object type */ - return_VALUE (ACPI_GET_OBJECT_TYPE (object)); + return_VALUE(ACPI_GET_OBJECT_TYPE(object)); } #endif - - |