aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/namespace/nsparse.c
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2005-08-05 00:44:28 -0400
committerLen Brown <len.brown@intel.com>2005-08-05 00:45:14 -0400
commit4be44fcd3bf648b782f4460fd06dfae6c42ded4b (patch)
tree5b5b7d296ea58786f53b95e5eac9565ff66890b0 /drivers/acpi/namespace/nsparse.c
parentc65ade4dc8b486e8c8b9b0a6399789a5428e2039 (diff)
[ACPI] Lindent all ACPI files
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/namespace/nsparse.c')
-rw-r--r--drivers/acpi/namespace/nsparse.c86
1 files changed, 37 insertions, 49 deletions
diff --git a/drivers/acpi/namespace/nsparse.c b/drivers/acpi/namespace/nsparse.c
index 24bed931d39d..433442a9ec74 100644
--- a/drivers/acpi/namespace/nsparse.c
+++ b/drivers/acpi/namespace/nsparse.c
@@ -41,16 +41,13 @@
41 * POSSIBILITY OF SUCH DAMAGES. 41 * POSSIBILITY OF SUCH DAMAGES.
42 */ 42 */
43 43
44
45#include <acpi/acpi.h> 44#include <acpi/acpi.h>
46#include <acpi/acnamesp.h> 45#include <acpi/acnamesp.h>
47#include <acpi/acparser.h> 46#include <acpi/acparser.h>
48#include <acpi/acdispat.h> 47#include <acpi/acdispat.h>
49 48
50
51#define _COMPONENT ACPI_NAMESPACE 49#define _COMPONENT ACPI_NAMESPACE
52 ACPI_MODULE_NAME ("nsparse") 50ACPI_MODULE_NAME("nsparse")
53
54 51
55/******************************************************************************* 52/*******************************************************************************
56 * 53 *
@@ -64,54 +61,50 @@
64 * DESCRIPTION: Perform one complete parse of an ACPI/AML table. 61 * DESCRIPTION: Perform one complete parse of an ACPI/AML table.
65 * 62 *
66 ******************************************************************************/ 63 ******************************************************************************/
67
68acpi_status 64acpi_status
69acpi_ns_one_complete_parse ( 65acpi_ns_one_complete_parse(u8 pass_number, struct acpi_table_desc * table_desc)
70 u8 pass_number,
71 struct acpi_table_desc *table_desc)
72{ 66{
73 union acpi_parse_object *parse_root; 67 union acpi_parse_object *parse_root;
74 acpi_status status; 68 acpi_status status;
75 struct acpi_walk_state *walk_state; 69 struct acpi_walk_state *walk_state;
76
77
78 ACPI_FUNCTION_TRACE ("ns_one_complete_parse");
79 70
71 ACPI_FUNCTION_TRACE("ns_one_complete_parse");
80 72
81 /* Create and init a Root Node */ 73 /* Create and init a Root Node */
82 74
83 parse_root = acpi_ps_create_scope_op (); 75 parse_root = acpi_ps_create_scope_op();
84 if (!parse_root) { 76 if (!parse_root) {
85 return_ACPI_STATUS (AE_NO_MEMORY); 77 return_ACPI_STATUS(AE_NO_MEMORY);
86 } 78 }
87 79
88 /* Create and initialize a new walk state */ 80 /* Create and initialize a new walk state */
89 81
90 walk_state = acpi_ds_create_walk_state (table_desc->owner_id, 82 walk_state = acpi_ds_create_walk_state(table_desc->owner_id,
91 NULL, NULL, NULL); 83 NULL, NULL, NULL);
92 if (!walk_state) { 84 if (!walk_state) {
93 acpi_ps_free_op (parse_root); 85 acpi_ps_free_op(parse_root);
94 return_ACPI_STATUS (AE_NO_MEMORY); 86 return_ACPI_STATUS(AE_NO_MEMORY);
95 } 87 }
96 88
97 status = acpi_ds_init_aml_walk (walk_state, parse_root, NULL, 89 status = acpi_ds_init_aml_walk(walk_state, parse_root, NULL,
98 table_desc->aml_start, table_desc->aml_length, 90 table_desc->aml_start,
99 NULL, pass_number); 91 table_desc->aml_length, NULL,
100 if (ACPI_FAILURE (status)) { 92 pass_number);
101 acpi_ds_delete_walk_state (walk_state); 93 if (ACPI_FAILURE(status)) {
102 return_ACPI_STATUS (status); 94 acpi_ds_delete_walk_state(walk_state);
95 return_ACPI_STATUS(status);
103 } 96 }
104 97
105 /* Parse the AML */ 98 /* Parse the AML */
106 99
107 ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, "*PARSE* pass %d parse\n", pass_number)); 100 ACPI_DEBUG_PRINT((ACPI_DB_PARSE, "*PARSE* pass %d parse\n",
108 status = acpi_ps_parse_aml (walk_state); 101 pass_number));
102 status = acpi_ps_parse_aml(walk_state);
109 103
110 acpi_ps_delete_parse_tree (parse_root); 104 acpi_ps_delete_parse_tree(parse_root);
111 return_ACPI_STATUS (status); 105 return_ACPI_STATUS(status);
112} 106}
113 107
114
115/******************************************************************************* 108/*******************************************************************************
116 * 109 *
117 * FUNCTION: acpi_ns_parse_table 110 * FUNCTION: acpi_ns_parse_table
@@ -126,15 +119,12 @@ acpi_ns_one_complete_parse (
126 ******************************************************************************/ 119 ******************************************************************************/
127 120
128acpi_status 121acpi_status
129acpi_ns_parse_table ( 122acpi_ns_parse_table(struct acpi_table_desc *table_desc,
130 struct acpi_table_desc *table_desc, 123 struct acpi_namespace_node *start_node)
131 struct acpi_namespace_node *start_node)
132{ 124{
133 acpi_status status; 125 acpi_status status;
134
135
136 ACPI_FUNCTION_TRACE ("ns_parse_table");
137 126
127 ACPI_FUNCTION_TRACE("ns_parse_table");
138 128
139 /* 129 /*
140 * AML Parse, pass 1 130 * AML Parse, pass 1
@@ -146,10 +136,10 @@ acpi_ns_parse_table (
146 * to service the entire parse. The second pass of the parse then 136 * to service the entire parse. The second pass of the parse then
147 * performs another complete parse of the AML.. 137 * performs another complete parse of the AML..
148 */ 138 */
149 ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, "**** Start pass 1\n")); 139 ACPI_DEBUG_PRINT((ACPI_DB_PARSE, "**** Start pass 1\n"));
150 status = acpi_ns_one_complete_parse (1, table_desc); 140 status = acpi_ns_one_complete_parse(1, table_desc);
151 if (ACPI_FAILURE (status)) { 141 if (ACPI_FAILURE(status)) {
152 return_ACPI_STATUS (status); 142 return_ACPI_STATUS(status);
153 } 143 }
154 144
155 /* 145 /*
@@ -161,13 +151,11 @@ acpi_ns_parse_table (
161 * overhead of this is compensated for by the fact that the 151 * overhead of this is compensated for by the fact that the
162 * parse objects are all cached. 152 * parse objects are all cached.
163 */ 153 */
164 ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, "**** Start pass 2\n")); 154 ACPI_DEBUG_PRINT((ACPI_DB_PARSE, "**** Start pass 2\n"));
165 status = acpi_ns_one_complete_parse (2, table_desc); 155 status = acpi_ns_one_complete_parse(2, table_desc);
166 if (ACPI_FAILURE (status)) { 156 if (ACPI_FAILURE(status)) {
167 return_ACPI_STATUS (status); 157 return_ACPI_STATUS(status);
168 } 158 }
169 159
170 return_ACPI_STATUS (status); 160 return_ACPI_STATUS(status);
171} 161}
172
173