diff options
author | Len Brown <len.brown@intel.com> | 2005-08-05 00:44:28 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2005-08-05 00:45:14 -0400 |
commit | 4be44fcd3bf648b782f4460fd06dfae6c42ded4b (patch) | |
tree | 5b5b7d296ea58786f53b95e5eac9565ff66890b0 /drivers/acpi/parser/psscope.c | |
parent | c65ade4dc8b486e8c8b9b0a6399789a5428e2039 (diff) |
[ACPI] Lindent all ACPI files
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/parser/psscope.c')
-rw-r--r-- | drivers/acpi/parser/psscope.c | 130 |
1 files changed, 50 insertions, 80 deletions
diff --git a/drivers/acpi/parser/psscope.c b/drivers/acpi/parser/psscope.c index 8dcd1b1e713..1c953b6f1af 100644 --- a/drivers/acpi/parser/psscope.c +++ b/drivers/acpi/parser/psscope.c @@ -41,13 +41,11 @@ * POSSIBILITY OF SUCH DAMAGES. */ - #include <acpi/acpi.h> #include <acpi/acparser.h> #define _COMPONENT ACPI_PARSER - ACPI_MODULE_NAME ("psscope") - +ACPI_MODULE_NAME("psscope") /******************************************************************************* * @@ -60,16 +58,13 @@ * DESCRIPTION: Get parent of current op being parsed * ******************************************************************************/ - -union acpi_parse_object * -acpi_ps_get_parent_scope ( - struct acpi_parse_state *parser_state) +union acpi_parse_object *acpi_ps_get_parent_scope(struct acpi_parse_state + *parser_state) { return (parser_state->scope->parse_scope.op); } - /******************************************************************************* * * FUNCTION: acpi_ps_has_completed_scope @@ -84,17 +79,14 @@ acpi_ps_get_parent_scope ( * ******************************************************************************/ -u8 -acpi_ps_has_completed_scope ( - struct acpi_parse_state *parser_state) +u8 acpi_ps_has_completed_scope(struct acpi_parse_state * parser_state) { return ((u8) - ((parser_state->aml >= parser_state->scope->parse_scope.arg_end || - !parser_state->scope->parse_scope.arg_count))); + ((parser_state->aml >= parser_state->scope->parse_scope.arg_end + || !parser_state->scope->parse_scope.arg_count))); } - /******************************************************************************* * * FUNCTION: acpi_ps_init_scope @@ -109,34 +101,30 @@ acpi_ps_has_completed_scope ( ******************************************************************************/ acpi_status -acpi_ps_init_scope ( - struct acpi_parse_state *parser_state, - union acpi_parse_object *root_op) +acpi_ps_init_scope(struct acpi_parse_state * parser_state, + union acpi_parse_object * root_op) { - union acpi_generic_state *scope; + union acpi_generic_state *scope; + ACPI_FUNCTION_TRACE_PTR("ps_init_scope", root_op); - ACPI_FUNCTION_TRACE_PTR ("ps_init_scope", root_op); - - - scope = acpi_ut_create_generic_state (); + scope = acpi_ut_create_generic_state(); if (!scope) { - return_ACPI_STATUS (AE_NO_MEMORY); + return_ACPI_STATUS(AE_NO_MEMORY); } - scope->common.data_type = ACPI_DESC_TYPE_STATE_RPSCOPE; - scope->parse_scope.op = root_op; + scope->common.data_type = ACPI_DESC_TYPE_STATE_RPSCOPE; + scope->parse_scope.op = root_op; scope->parse_scope.arg_count = ACPI_VAR_ARGS; - scope->parse_scope.arg_end = parser_state->aml_end; - scope->parse_scope.pkg_end = parser_state->aml_end; + scope->parse_scope.arg_end = parser_state->aml_end; + scope->parse_scope.pkg_end = parser_state->aml_end; - parser_state->scope = scope; - parser_state->start_op = root_op; + parser_state->scope = scope; + parser_state->start_op = root_op; - return_ACPI_STATUS (AE_OK); + return_ACPI_STATUS(AE_OK); } - /******************************************************************************* * * FUNCTION: acpi_ps_push_scope @@ -153,48 +141,42 @@ acpi_ps_init_scope ( ******************************************************************************/ acpi_status -acpi_ps_push_scope ( - struct acpi_parse_state *parser_state, - union acpi_parse_object *op, - u32 remaining_args, - u32 arg_count) +acpi_ps_push_scope(struct acpi_parse_state *parser_state, + union acpi_parse_object *op, + u32 remaining_args, u32 arg_count) { - union acpi_generic_state *scope; - - - ACPI_FUNCTION_TRACE_PTR ("ps_push_scope", op); + union acpi_generic_state *scope; + ACPI_FUNCTION_TRACE_PTR("ps_push_scope", op); - scope = acpi_ut_create_generic_state (); + scope = acpi_ut_create_generic_state(); if (!scope) { - return_ACPI_STATUS (AE_NO_MEMORY); + return_ACPI_STATUS(AE_NO_MEMORY); } - scope->common.data_type = ACPI_DESC_TYPE_STATE_PSCOPE; - scope->parse_scope.op = op; + scope->common.data_type = ACPI_DESC_TYPE_STATE_PSCOPE; + scope->parse_scope.op = op; scope->parse_scope.arg_list = remaining_args; scope->parse_scope.arg_count = arg_count; scope->parse_scope.pkg_end = parser_state->pkg_end; /* Push onto scope stack */ - acpi_ut_push_generic_state (&parser_state->scope, scope); + acpi_ut_push_generic_state(&parser_state->scope, scope); if (arg_count == ACPI_VAR_ARGS) { /* Multiple arguments */ scope->parse_scope.arg_end = parser_state->pkg_end; - } - else { + } else { /* Single argument */ - scope->parse_scope.arg_end = ACPI_TO_POINTER (ACPI_MAX_PTR); + scope->parse_scope.arg_end = ACPI_TO_POINTER(ACPI_MAX_PTR); } - return_ACPI_STATUS (AE_OK); + return_ACPI_STATUS(AE_OK); } - /******************************************************************************* * * FUNCTION: acpi_ps_pop_scope @@ -212,48 +194,41 @@ acpi_ps_push_scope ( ******************************************************************************/ void -acpi_ps_pop_scope ( - struct acpi_parse_state *parser_state, - union acpi_parse_object **op, - u32 *arg_list, - u32 *arg_count) +acpi_ps_pop_scope(struct acpi_parse_state *parser_state, + union acpi_parse_object **op, u32 * arg_list, u32 * arg_count) { - union acpi_generic_state *scope = parser_state->scope; - - - ACPI_FUNCTION_TRACE ("ps_pop_scope"); + union acpi_generic_state *scope = parser_state->scope; + ACPI_FUNCTION_TRACE("ps_pop_scope"); /* Only pop the scope if there is in fact a next scope */ if (scope->common.next) { - scope = acpi_ut_pop_generic_state (&parser_state->scope); + scope = acpi_ut_pop_generic_state(&parser_state->scope); /* return to parsing previous op */ - *op = scope->parse_scope.op; - *arg_list = scope->parse_scope.arg_list; - *arg_count = scope->parse_scope.arg_count; + *op = scope->parse_scope.op; + *arg_list = scope->parse_scope.arg_list; + *arg_count = scope->parse_scope.arg_count; parser_state->pkg_end = scope->parse_scope.pkg_end; /* All done with this scope state structure */ - acpi_ut_delete_generic_state (scope); - } - else { + acpi_ut_delete_generic_state(scope); + } else { /* empty parse stack, prepare to fetch next opcode */ - *op = NULL; + *op = NULL; *arg_list = 0; *arg_count = 0; } - ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, - "Popped Op %p Args %X\n", *op, *arg_count)); + ACPI_DEBUG_PRINT((ACPI_DB_PARSE, + "Popped Op %p Args %X\n", *op, *arg_count)); return_VOID; } - /******************************************************************************* * * FUNCTION: acpi_ps_cleanup_scope @@ -267,15 +242,11 @@ acpi_ps_pop_scope ( * ******************************************************************************/ -void -acpi_ps_cleanup_scope ( - struct acpi_parse_state *parser_state) +void acpi_ps_cleanup_scope(struct acpi_parse_state *parser_state) { - union acpi_generic_state *scope; - - - ACPI_FUNCTION_TRACE_PTR ("ps_cleanup_scope", parser_state); + union acpi_generic_state *scope; + ACPI_FUNCTION_TRACE_PTR("ps_cleanup_scope", parser_state); if (!parser_state) { return_VOID; @@ -284,10 +255,9 @@ acpi_ps_cleanup_scope ( /* Delete anything on the scope stack */ while (parser_state->scope) { - scope = acpi_ut_pop_generic_state (&parser_state->scope); - acpi_ut_delete_generic_state (scope); + scope = acpi_ut_pop_generic_state(&parser_state->scope); + acpi_ut_delete_generic_state(scope); } return_VOID; } - |