aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/dispatcher/dsinit.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/dispatcher/dsinit.c
parentc65ade4dc8b486e8c8b9b0a6399789a5428e2039 (diff)
[ACPI] Lindent all ACPI files
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/dispatcher/dsinit.c')
-rw-r--r--drivers/acpi/dispatcher/dsinit.c123
1 files changed, 55 insertions, 68 deletions
diff --git a/drivers/acpi/dispatcher/dsinit.c b/drivers/acpi/dispatcher/dsinit.c
index bcd1d472b90f..8693c704aea6 100644
--- a/drivers/acpi/dispatcher/dsinit.c
+++ b/drivers/acpi/dispatcher/dsinit.c
@@ -41,23 +41,17 @@
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/acdispat.h> 45#include <acpi/acdispat.h>
47#include <acpi/acnamesp.h> 46#include <acpi/acnamesp.h>
48 47
49#define _COMPONENT ACPI_DISPATCHER 48#define _COMPONENT ACPI_DISPATCHER
50 ACPI_MODULE_NAME ("dsinit") 49ACPI_MODULE_NAME("dsinit")
51 50
52/* Local prototypes */ 51/* Local prototypes */
53
54static acpi_status 52static acpi_status
55acpi_ds_init_one_object ( 53acpi_ds_init_one_object(acpi_handle obj_handle,
56 acpi_handle obj_handle, 54 u32 level, void *context, void **return_value);
57 u32 level,
58 void *context,
59 void **return_value);
60
61 55
62/******************************************************************************* 56/*******************************************************************************
63 * 57 *
@@ -80,20 +74,17 @@ acpi_ds_init_one_object (
80 ******************************************************************************/ 74 ******************************************************************************/
81 75
82static acpi_status 76static acpi_status
83acpi_ds_init_one_object ( 77acpi_ds_init_one_object(acpi_handle obj_handle,
84 acpi_handle obj_handle, 78 u32 level, void *context, void **return_value)
85 u32 level,
86 void *context,
87 void **return_value)
88{ 79{
89 struct acpi_init_walk_info *info = (struct acpi_init_walk_info *) context; 80 struct acpi_init_walk_info *info =
90 struct acpi_namespace_node *node = (struct acpi_namespace_node *) obj_handle; 81 (struct acpi_init_walk_info *)context;
91 acpi_object_type type; 82 struct acpi_namespace_node *node =
92 acpi_status status; 83 (struct acpi_namespace_node *)obj_handle;
93 84 acpi_object_type type;
94 85 acpi_status status;
95 ACPI_FUNCTION_NAME ("ds_init_one_object");
96 86
87 ACPI_FUNCTION_NAME("ds_init_one_object");
97 88
98 /* 89 /*
99 * We are only interested in NS nodes owned by the table that 90 * We are only interested in NS nodes owned by the table that
@@ -107,23 +98,23 @@ acpi_ds_init_one_object (
107 98
108 /* And even then, we are only interested in a few object types */ 99 /* And even then, we are only interested in a few object types */
109 100
110 type = acpi_ns_get_type (obj_handle); 101 type = acpi_ns_get_type(obj_handle);
111 102
112 switch (type) { 103 switch (type) {
113 case ACPI_TYPE_REGION: 104 case ACPI_TYPE_REGION:
114 105
115 status = acpi_ds_initialize_region (obj_handle); 106 status = acpi_ds_initialize_region(obj_handle);
116 if (ACPI_FAILURE (status)) { 107 if (ACPI_FAILURE(status)) {
117 ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, 108 ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
118 "Region %p [%4.4s] - Init failure, %s\n", 109 "Region %p [%4.4s] - Init failure, %s\n",
119 obj_handle, acpi_ut_get_node_name (obj_handle), 110 obj_handle,
120 acpi_format_exception (status))); 111 acpi_ut_get_node_name(obj_handle),
112 acpi_format_exception(status)));
121 } 113 }
122 114
123 info->op_region_count++; 115 info->op_region_count++;
124 break; 116 break;
125 117
126
127 case ACPI_TYPE_METHOD: 118 case ACPI_TYPE_METHOD:
128 119
129 /* 120 /*
@@ -131,7 +122,7 @@ acpi_ds_init_one_object (
131 * the entire pathname 122 * the entire pathname
132 */ 123 */
133 if (!(acpi_dbg_level & ACPI_LV_INIT_NAMES)) { 124 if (!(acpi_dbg_level & ACPI_LV_INIT_NAMES)) {
134 ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INIT, ".")); 125 ACPI_DEBUG_PRINT_RAW((ACPI_DB_INIT, "."));
135 } 126 }
136 127
137 /* 128 /*
@@ -148,12 +139,13 @@ acpi_ds_init_one_object (
148 * Always parse methods to detect errors, we will delete 139 * Always parse methods to detect errors, we will delete
149 * the parse tree below 140 * the parse tree below
150 */ 141 */
151 status = acpi_ds_parse_method (obj_handle); 142 status = acpi_ds_parse_method(obj_handle);
152 if (ACPI_FAILURE (status)) { 143 if (ACPI_FAILURE(status)) {
153 ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, 144 ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
154 "\n+Method %p [%4.4s] - parse failure, %s\n", 145 "\n+Method %p [%4.4s] - parse failure, %s\n",
155 obj_handle, acpi_ut_get_node_name (obj_handle), 146 obj_handle,
156 acpi_format_exception (status))); 147 acpi_ut_get_node_name(obj_handle),
148 acpi_format_exception(status)));
157 149
158 /* This parse failed, but we will continue parsing more methods */ 150 /* This parse failed, but we will continue parsing more methods */
159 } 151 }
@@ -161,13 +153,11 @@ acpi_ds_init_one_object (
161 info->method_count++; 153 info->method_count++;
162 break; 154 break;
163 155
164
165 case ACPI_TYPE_DEVICE: 156 case ACPI_TYPE_DEVICE:
166 157
167 info->device_count++; 158 info->device_count++;
168 break; 159 break;
169 160
170
171 default: 161 default:
172 break; 162 break;
173 } 163 }
@@ -179,7 +169,6 @@ acpi_ds_init_one_object (
179 return (AE_OK); 169 return (AE_OK);
180} 170}
181 171
182
183/******************************************************************************* 172/*******************************************************************************
184 * 173 *
185 * FUNCTION: acpi_ds_initialize_objects 174 * FUNCTION: acpi_ds_initialize_objects
@@ -195,45 +184,43 @@ acpi_ds_init_one_object (
195 ******************************************************************************/ 184 ******************************************************************************/
196 185
197acpi_status 186acpi_status
198acpi_ds_initialize_objects ( 187acpi_ds_initialize_objects(struct acpi_table_desc * table_desc,
199 struct acpi_table_desc *table_desc, 188 struct acpi_namespace_node * start_node)
200 struct acpi_namespace_node *start_node)
201{ 189{
202 acpi_status status; 190 acpi_status status;
203 struct acpi_init_walk_info info; 191 struct acpi_init_walk_info info;
204
205 192
206 ACPI_FUNCTION_TRACE ("ds_initialize_objects"); 193 ACPI_FUNCTION_TRACE("ds_initialize_objects");
207 194
195 ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH,
196 "**** Starting initialization of namespace objects ****\n"));
197 ACPI_DEBUG_PRINT_RAW((ACPI_DB_INIT, "Parsing all Control Methods:"));
208 198
209 ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, 199 info.method_count = 0;
210 "**** Starting initialization of namespace objects ****\n"));
211 ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INIT, "Parsing all Control Methods:"));
212
213 info.method_count = 0;
214 info.op_region_count = 0; 200 info.op_region_count = 0;
215 info.object_count = 0; 201 info.object_count = 0;
216 info.device_count = 0; 202 info.device_count = 0;
217 info.table_desc = table_desc; 203 info.table_desc = table_desc;
218 204
219 /* Walk entire namespace from the supplied root */ 205 /* Walk entire namespace from the supplied root */
220 206
221 status = acpi_walk_namespace (ACPI_TYPE_ANY, start_node, ACPI_UINT32_MAX, 207 status = acpi_walk_namespace(ACPI_TYPE_ANY, start_node, ACPI_UINT32_MAX,
222 acpi_ds_init_one_object, &info, NULL); 208 acpi_ds_init_one_object, &info, NULL);
223 if (ACPI_FAILURE (status)) { 209 if (ACPI_FAILURE(status)) {
224 ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "walk_namespace failed, %s\n", 210 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "walk_namespace failed, %s\n",
225 acpi_format_exception (status))); 211 acpi_format_exception(status)));
226 } 212 }
227 213
228 ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INIT, 214 ACPI_DEBUG_PRINT_RAW((ACPI_DB_INIT,
229 "\nTable [%4.4s](id %4.4X) - %hd Objects with %hd Devices %hd Methods %hd Regions\n", 215 "\nTable [%4.4s](id %4.4X) - %hd Objects with %hd Devices %hd Methods %hd Regions\n",
230 table_desc->pointer->signature, table_desc->owner_id, info.object_count, 216 table_desc->pointer->signature,
231 info.device_count, info.method_count, info.op_region_count)); 217 table_desc->owner_id, info.object_count,
218 info.device_count, info.method_count,
219 info.op_region_count));
232 220
233 ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, 221 ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH,
234 "%hd Methods, %hd Regions\n", info.method_count, info.op_region_count)); 222 "%hd Methods, %hd Regions\n", info.method_count,
223 info.op_region_count));
235 224
236 return_ACPI_STATUS (AE_OK); 225 return_ACPI_STATUS(AE_OK);
237} 226}
238
239