Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git] / drivers / acpi / parser / pswalk.c
index 110d2ce..06f05bf 100644 (file)
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2005, R. Byron Moore
+ * Copyright (C) 2000 - 2006, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * POSSIBILITY OF SUCH DAMAGES.
  */
 
-
 #include <acpi/acpi.h>
 #include <acpi/acparser.h>
 
 #define _COMPONENT          ACPI_PARSER
-        ACPI_MODULE_NAME    ("pswalk")
-
+ACPI_MODULE_NAME("pswalk")
 
 /*******************************************************************************
  *
  * DESCRIPTION: Delete a portion of or an entire parse tree.
  *
  ******************************************************************************/
-
-void
-acpi_ps_delete_parse_tree (
-       union acpi_parse_object         *subtree_root)
+void acpi_ps_delete_parse_tree(union acpi_parse_object *subtree_root)
 {
-       union acpi_parse_object         *op = subtree_root;
-       union acpi_parse_object         *next = NULL;
-       union acpi_parse_object         *parent = NULL;
-
-
-       ACPI_FUNCTION_TRACE_PTR ("ps_delete_parse_tree", subtree_root);
+       union acpi_parse_object *op = subtree_root;
+       union acpi_parse_object *next = NULL;
+       union acpi_parse_object *parent = NULL;
 
+       ACPI_FUNCTION_TRACE_PTR("ps_delete_parse_tree", subtree_root);
 
        /* Visit all nodes in the subtree */
 
@@ -81,7 +74,7 @@ acpi_ps_delete_parse_tree (
                if (op != parent) {
                        /* Look for an argument or child of the current op */
 
-                       next = acpi_ps_get_arg (op, 0);
+                       next = acpi_ps_get_arg(op, 0);
                        if (next) {
                                /* Still going downward in tree (Op is not completed yet) */
 
@@ -90,26 +83,24 @@ acpi_ps_delete_parse_tree (
                        }
                }
 
-               /*
-                * No more children, this Op is complete.
-                */
+               /* No more children, this Op is complete. */
+
                next = op->common.next;
                parent = op->common.parent;
 
-               acpi_ps_free_op (op);
+               acpi_ps_free_op(op);
+
+               /* If we are back to the starting point, the walk is complete. */
 
-               /*
-                * If we are back to the starting point, the walk is complete.
-                */
                if (op == subtree_root) {
                        return_VOID;
                }
                if (next) {
                        op = next;
-               }
-               else {
+               } else {
                        op = parent;
                }
        }
+
        return_VOID;
 }