diff options
author | Tony Luck <tony.luck@intel.com> | 2005-09-08 14:27:13 -0700 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2005-09-08 14:27:13 -0700 |
commit | 344a076110f4ecb16ea6d286b63be696604982ed (patch) | |
tree | def6e229efdb6ee91b631b6695bf7f9ace8e2719 /drivers/acpi/parser/pstree.c | |
parent | 9b17e7e74e767d8a494a74c3c459aeecd1e08c5f (diff) | |
parent | 1b11d78cf87a7014f96e5b7fa2e1233cc8081a00 (diff) |
[IA64] Manual merge fix for 3 files
arch/ia64/Kconfig
arch/ia64/kernel/acpi.c
include/asm-ia64/irq.h
Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'drivers/acpi/parser/pstree.c')
-rw-r--r-- | drivers/acpi/parser/pstree.c | 92 |
1 files changed, 30 insertions, 62 deletions
diff --git a/drivers/acpi/parser/pstree.c b/drivers/acpi/parser/pstree.c index d5aafe73fca..f0e755884ee 100644 --- a/drivers/acpi/parser/pstree.c +++ b/drivers/acpi/parser/pstree.c @@ -41,23 +41,18 @@ * POSSIBILITY OF SUCH DAMAGES. */ - #include <acpi/acpi.h> #include <acpi/acparser.h> #include <acpi/amlcode.h> #define _COMPONENT ACPI_PARSER - ACPI_MODULE_NAME ("pstree") +ACPI_MODULE_NAME("pstree") /* Local prototypes */ - #ifdef ACPI_OBSOLETE_FUNCTIONS -union acpi_parse_object * -acpi_ps_get_child ( - union acpi_parse_object *op); +union acpi_parse_object *acpi_ps_get_child(union acpi_parse_object *op); #endif - /******************************************************************************* * * FUNCTION: acpi_ps_get_arg @@ -71,21 +66,16 @@ acpi_ps_get_child ( * ******************************************************************************/ -union acpi_parse_object * -acpi_ps_get_arg ( - union acpi_parse_object *op, - u32 argn) +union acpi_parse_object *acpi_ps_get_arg(union acpi_parse_object *op, u32 argn) { - union acpi_parse_object *arg = NULL; - const struct acpi_opcode_info *op_info; - - - ACPI_FUNCTION_ENTRY (); + union acpi_parse_object *arg = NULL; + const struct acpi_opcode_info *op_info; + ACPI_FUNCTION_ENTRY(); /* Get the info structure for this opcode */ - op_info = acpi_ps_get_opcode_info (op->common.aml_opcode); + op_info = acpi_ps_get_opcode_info(op->common.aml_opcode); if (op_info->class == AML_CLASS_UNKNOWN) { /* Invalid opcode or ASCII character */ @@ -111,7 +101,6 @@ acpi_ps_get_arg ( return (arg); } - /******************************************************************************* * * FUNCTION: acpi_ps_append_arg @@ -126,16 +115,12 @@ acpi_ps_get_arg ( ******************************************************************************/ void -acpi_ps_append_arg ( - union acpi_parse_object *op, - union acpi_parse_object *arg) +acpi_ps_append_arg(union acpi_parse_object *op, union acpi_parse_object *arg) { - union acpi_parse_object *prev_arg; - const struct acpi_opcode_info *op_info; - - - ACPI_FUNCTION_ENTRY (); + union acpi_parse_object *prev_arg; + const struct acpi_opcode_info *op_info; + ACPI_FUNCTION_ENTRY(); if (!op) { return; @@ -143,12 +128,11 @@ acpi_ps_append_arg ( /* Get the info structure for this opcode */ - op_info = acpi_ps_get_opcode_info (op->common.aml_opcode); + op_info = acpi_ps_get_opcode_info(op->common.aml_opcode); if (op_info->class == AML_CLASS_UNKNOWN) { /* Invalid opcode */ - ACPI_REPORT_ERROR (("ps_append_arg: Invalid AML Opcode: 0x%2.2X\n", - op->common.aml_opcode)); + ACPI_REPORT_ERROR(("ps_append_arg: Invalid AML Opcode: 0x%2.2X\n", op->common.aml_opcode)); return; } @@ -170,8 +154,7 @@ acpi_ps_append_arg ( prev_arg = prev_arg->common.next; } prev_arg->common.next = arg; - } - else { + } else { /* No argument list, this will be the first argument */ op->common.value.arg = arg; @@ -185,7 +168,6 @@ acpi_ps_append_arg ( } } - #ifdef ACPI_FUTURE_USAGE /******************************************************************************* * @@ -201,18 +183,14 @@ acpi_ps_append_arg ( * ******************************************************************************/ -union acpi_parse_object * -acpi_ps_get_depth_next ( - union acpi_parse_object *origin, - union acpi_parse_object *op) +union acpi_parse_object *acpi_ps_get_depth_next(union acpi_parse_object *origin, + union acpi_parse_object *op) { - union acpi_parse_object *next = NULL; - union acpi_parse_object *parent; - union acpi_parse_object *arg; - - - ACPI_FUNCTION_ENTRY (); + union acpi_parse_object *next = NULL; + union acpi_parse_object *parent; + union acpi_parse_object *arg; + ACPI_FUNCTION_ENTRY(); if (!op) { return (NULL); @@ -220,7 +198,7 @@ acpi_ps_get_depth_next ( /* Look for an argument or child */ - next = acpi_ps_get_arg (op, 0); + next = acpi_ps_get_arg(op, 0); if (next) { return (next); } @@ -237,7 +215,7 @@ acpi_ps_get_depth_next ( parent = op->common.parent; while (parent) { - arg = acpi_ps_get_arg (parent, 0); + arg = acpi_ps_get_arg(parent, 0); while (arg && (arg != origin) && (arg != op)) { arg = arg->common.next; } @@ -261,7 +239,6 @@ acpi_ps_get_depth_next ( return (next); } - #ifdef ACPI_OBSOLETE_FUNCTIONS /******************************************************************************* * @@ -275,15 +252,11 @@ acpi_ps_get_depth_next ( * ******************************************************************************/ -union acpi_parse_object * -acpi_ps_get_child ( - union acpi_parse_object *op) +union acpi_parse_object *acpi_ps_get_child(union acpi_parse_object *op) { - union acpi_parse_object *child = NULL; - - - ACPI_FUNCTION_ENTRY (); + union acpi_parse_object *child = NULL; + ACPI_FUNCTION_ENTRY(); switch (op->common.aml_opcode) { case AML_SCOPE_OP: @@ -292,10 +265,9 @@ acpi_ps_get_child ( case AML_THERMAL_ZONE_OP: case AML_INT_METHODCALL_OP: - child = acpi_ps_get_arg (op, 0); + child = acpi_ps_get_arg(op, 0); break; - case AML_BUFFER_OP: case AML_PACKAGE_OP: case AML_METHOD_OP: @@ -303,24 +275,21 @@ acpi_ps_get_child ( case AML_WHILE_OP: case AML_FIELD_OP: - child = acpi_ps_get_arg (op, 1); + child = acpi_ps_get_arg(op, 1); break; - case AML_POWER_RES_OP: case AML_INDEX_FIELD_OP: - child = acpi_ps_get_arg (op, 2); + child = acpi_ps_get_arg(op, 2); break; - case AML_PROCESSOR_OP: case AML_BANK_FIELD_OP: - child = acpi_ps_get_arg (op, 3); + child = acpi_ps_get_arg(op, 3); break; - default: /* All others have no children */ break; @@ -330,5 +299,4 @@ acpi_ps_get_child ( } #endif -#endif /* ACPI_FUTURE_USAGE */ - +#endif /* ACPI_FUTURE_USAGE */ |