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/resources/rsutils.c | |
parent | c65ade4dc8b486e8c8b9b0a6399789a5428e2039 (diff) |
[ACPI] Lindent all ACPI files
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/resources/rsutils.c')
-rw-r--r-- | drivers/acpi/resources/rsutils.c | 159 |
1 files changed, 66 insertions, 93 deletions
diff --git a/drivers/acpi/resources/rsutils.c b/drivers/acpi/resources/rsutils.c index 700cf7d65d76..4446778eaf79 100644 --- a/drivers/acpi/resources/rsutils.c +++ b/drivers/acpi/resources/rsutils.c | |||
@@ -41,15 +41,12 @@ | |||
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/acresrc.h> | 46 | #include <acpi/acresrc.h> |
48 | 47 | ||
49 | |||
50 | #define _COMPONENT ACPI_RESOURCES | 48 | #define _COMPONENT ACPI_RESOURCES |
51 | ACPI_MODULE_NAME ("rsutils") | 49 | ACPI_MODULE_NAME("rsutils") |
52 | |||
53 | 50 | ||
54 | /******************************************************************************* | 51 | /******************************************************************************* |
55 | * | 52 | * |
@@ -68,42 +65,36 @@ | |||
68 | * and the contents of the callers buffer is undefined. | 65 | * and the contents of the callers buffer is undefined. |
69 | * | 66 | * |
70 | ******************************************************************************/ | 67 | ******************************************************************************/ |
71 | |||
72 | acpi_status | 68 | acpi_status |
73 | acpi_rs_get_prt_method_data ( | 69 | acpi_rs_get_prt_method_data(acpi_handle handle, struct acpi_buffer *ret_buffer) |
74 | acpi_handle handle, | ||
75 | struct acpi_buffer *ret_buffer) | ||
76 | { | 70 | { |
77 | union acpi_operand_object *obj_desc; | 71 | union acpi_operand_object *obj_desc; |
78 | acpi_status status; | 72 | acpi_status status; |
79 | |||
80 | |||
81 | ACPI_FUNCTION_TRACE ("rs_get_prt_method_data"); | ||
82 | 73 | ||
74 | ACPI_FUNCTION_TRACE("rs_get_prt_method_data"); | ||
83 | 75 | ||
84 | /* Parameters guaranteed valid by caller */ | 76 | /* Parameters guaranteed valid by caller */ |
85 | 77 | ||
86 | /* Execute the method, no parameters */ | 78 | /* Execute the method, no parameters */ |
87 | 79 | ||
88 | status = acpi_ut_evaluate_object (handle, METHOD_NAME__PRT, | 80 | status = acpi_ut_evaluate_object(handle, METHOD_NAME__PRT, |
89 | ACPI_BTYPE_PACKAGE, &obj_desc); | 81 | ACPI_BTYPE_PACKAGE, &obj_desc); |
90 | if (ACPI_FAILURE (status)) { | 82 | if (ACPI_FAILURE(status)) { |
91 | return_ACPI_STATUS (status); | 83 | return_ACPI_STATUS(status); |
92 | } | 84 | } |
93 | 85 | ||
94 | /* | 86 | /* |
95 | * Create a resource linked list from the byte stream buffer that comes | 87 | * Create a resource linked list from the byte stream buffer that comes |
96 | * back from the _CRS method execution. | 88 | * back from the _CRS method execution. |
97 | */ | 89 | */ |
98 | status = acpi_rs_create_pci_routing_table (obj_desc, ret_buffer); | 90 | status = acpi_rs_create_pci_routing_table(obj_desc, ret_buffer); |
99 | 91 | ||
100 | /* On exit, we must delete the object returned by evaluate_object */ | 92 | /* On exit, we must delete the object returned by evaluate_object */ |
101 | 93 | ||
102 | acpi_ut_remove_reference (obj_desc); | 94 | acpi_ut_remove_reference(obj_desc); |
103 | return_ACPI_STATUS (status); | 95 | return_ACPI_STATUS(status); |
104 | } | 96 | } |
105 | 97 | ||
106 | |||
107 | /******************************************************************************* | 98 | /******************************************************************************* |
108 | * | 99 | * |
109 | * FUNCTION: acpi_rs_get_crs_method_data | 100 | * FUNCTION: acpi_rs_get_crs_method_data |
@@ -123,25 +114,21 @@ acpi_rs_get_prt_method_data ( | |||
123 | ******************************************************************************/ | 114 | ******************************************************************************/ |
124 | 115 | ||
125 | acpi_status | 116 | acpi_status |
126 | acpi_rs_get_crs_method_data ( | 117 | acpi_rs_get_crs_method_data(acpi_handle handle, struct acpi_buffer *ret_buffer) |
127 | acpi_handle handle, | ||
128 | struct acpi_buffer *ret_buffer) | ||
129 | { | 118 | { |
130 | union acpi_operand_object *obj_desc; | 119 | union acpi_operand_object *obj_desc; |
131 | acpi_status status; | 120 | acpi_status status; |
132 | |||
133 | |||
134 | ACPI_FUNCTION_TRACE ("rs_get_crs_method_data"); | ||
135 | 121 | ||
122 | ACPI_FUNCTION_TRACE("rs_get_crs_method_data"); | ||
136 | 123 | ||
137 | /* Parameters guaranteed valid by caller */ | 124 | /* Parameters guaranteed valid by caller */ |
138 | 125 | ||
139 | /* Execute the method, no parameters */ | 126 | /* Execute the method, no parameters */ |
140 | 127 | ||
141 | status = acpi_ut_evaluate_object (handle, METHOD_NAME__CRS, | 128 | status = acpi_ut_evaluate_object(handle, METHOD_NAME__CRS, |
142 | ACPI_BTYPE_BUFFER, &obj_desc); | 129 | ACPI_BTYPE_BUFFER, &obj_desc); |
143 | if (ACPI_FAILURE (status)) { | 130 | if (ACPI_FAILURE(status)) { |
144 | return_ACPI_STATUS (status); | 131 | return_ACPI_STATUS(status); |
145 | } | 132 | } |
146 | 133 | ||
147 | /* | 134 | /* |
@@ -149,15 +136,14 @@ acpi_rs_get_crs_method_data ( | |||
149 | * byte stream buffer that comes back from the _CRS method | 136 | * byte stream buffer that comes back from the _CRS method |
150 | * execution. | 137 | * execution. |
151 | */ | 138 | */ |
152 | status = acpi_rs_create_resource_list (obj_desc, ret_buffer); | 139 | status = acpi_rs_create_resource_list(obj_desc, ret_buffer); |
153 | 140 | ||
154 | /* on exit, we must delete the object returned by evaluate_object */ | 141 | /* on exit, we must delete the object returned by evaluate_object */ |
155 | 142 | ||
156 | acpi_ut_remove_reference (obj_desc); | 143 | acpi_ut_remove_reference(obj_desc); |
157 | return_ACPI_STATUS (status); | 144 | return_ACPI_STATUS(status); |
158 | } | 145 | } |
159 | 146 | ||
160 | |||
161 | /******************************************************************************* | 147 | /******************************************************************************* |
162 | * | 148 | * |
163 | * FUNCTION: acpi_rs_get_prs_method_data | 149 | * FUNCTION: acpi_rs_get_prs_method_data |
@@ -178,25 +164,21 @@ acpi_rs_get_crs_method_data ( | |||
178 | 164 | ||
179 | #ifdef ACPI_FUTURE_USAGE | 165 | #ifdef ACPI_FUTURE_USAGE |
180 | acpi_status | 166 | acpi_status |
181 | acpi_rs_get_prs_method_data ( | 167 | acpi_rs_get_prs_method_data(acpi_handle handle, struct acpi_buffer *ret_buffer) |
182 | acpi_handle handle, | ||
183 | struct acpi_buffer *ret_buffer) | ||
184 | { | 168 | { |
185 | union acpi_operand_object *obj_desc; | 169 | union acpi_operand_object *obj_desc; |
186 | acpi_status status; | 170 | acpi_status status; |
187 | |||
188 | |||
189 | ACPI_FUNCTION_TRACE ("rs_get_prs_method_data"); | ||
190 | 171 | ||
172 | ACPI_FUNCTION_TRACE("rs_get_prs_method_data"); | ||
191 | 173 | ||
192 | /* Parameters guaranteed valid by caller */ | 174 | /* Parameters guaranteed valid by caller */ |
193 | 175 | ||
194 | /* Execute the method, no parameters */ | 176 | /* Execute the method, no parameters */ |
195 | 177 | ||
196 | status = acpi_ut_evaluate_object (handle, METHOD_NAME__PRS, | 178 | status = acpi_ut_evaluate_object(handle, METHOD_NAME__PRS, |
197 | ACPI_BTYPE_BUFFER, &obj_desc); | 179 | ACPI_BTYPE_BUFFER, &obj_desc); |
198 | if (ACPI_FAILURE (status)) { | 180 | if (ACPI_FAILURE(status)) { |
199 | return_ACPI_STATUS (status); | 181 | return_ACPI_STATUS(status); |
200 | } | 182 | } |
201 | 183 | ||
202 | /* | 184 | /* |
@@ -204,15 +186,14 @@ acpi_rs_get_prs_method_data ( | |||
204 | * byte stream buffer that comes back from the _CRS method | 186 | * byte stream buffer that comes back from the _CRS method |
205 | * execution. | 187 | * execution. |
206 | */ | 188 | */ |
207 | status = acpi_rs_create_resource_list (obj_desc, ret_buffer); | 189 | status = acpi_rs_create_resource_list(obj_desc, ret_buffer); |
208 | 190 | ||
209 | /* on exit, we must delete the object returned by evaluate_object */ | 191 | /* on exit, we must delete the object returned by evaluate_object */ |
210 | 192 | ||
211 | acpi_ut_remove_reference (obj_desc); | 193 | acpi_ut_remove_reference(obj_desc); |
212 | return_ACPI_STATUS (status); | 194 | return_ACPI_STATUS(status); |
213 | } | 195 | } |
214 | #endif /* ACPI_FUTURE_USAGE */ | 196 | #endif /* ACPI_FUTURE_USAGE */ |
215 | |||
216 | 197 | ||
217 | /******************************************************************************* | 198 | /******************************************************************************* |
218 | * | 199 | * |
@@ -234,25 +215,22 @@ acpi_rs_get_prs_method_data ( | |||
234 | ******************************************************************************/ | 215 | ******************************************************************************/ |
235 | 216 | ||
236 | acpi_status | 217 | acpi_status |
237 | acpi_rs_get_method_data ( | 218 | acpi_rs_get_method_data(acpi_handle handle, |
238 | acpi_handle handle, | 219 | char *path, struct acpi_buffer *ret_buffer) |
239 | char *path, | ||
240 | struct acpi_buffer *ret_buffer) | ||
241 | { | 220 | { |
242 | union acpi_operand_object *obj_desc; | 221 | union acpi_operand_object *obj_desc; |
243 | acpi_status status; | 222 | acpi_status status; |
244 | |||
245 | |||
246 | ACPI_FUNCTION_TRACE ("rs_get_method_data"); | ||
247 | 223 | ||
224 | ACPI_FUNCTION_TRACE("rs_get_method_data"); | ||
248 | 225 | ||
249 | /* Parameters guaranteed valid by caller */ | 226 | /* Parameters guaranteed valid by caller */ |
250 | 227 | ||
251 | /* Execute the method, no parameters */ | 228 | /* Execute the method, no parameters */ |
252 | 229 | ||
253 | status = acpi_ut_evaluate_object (handle, path, ACPI_BTYPE_BUFFER, &obj_desc); | 230 | status = |
254 | if (ACPI_FAILURE (status)) { | 231 | acpi_ut_evaluate_object(handle, path, ACPI_BTYPE_BUFFER, &obj_desc); |
255 | return_ACPI_STATUS (status); | 232 | if (ACPI_FAILURE(status)) { |
233 | return_ACPI_STATUS(status); | ||
256 | } | 234 | } |
257 | 235 | ||
258 | /* | 236 | /* |
@@ -260,12 +238,12 @@ acpi_rs_get_method_data ( | |||
260 | * byte stream buffer that comes back from the method | 238 | * byte stream buffer that comes back from the method |
261 | * execution. | 239 | * execution. |
262 | */ | 240 | */ |
263 | status = acpi_rs_create_resource_list (obj_desc, ret_buffer); | 241 | status = acpi_rs_create_resource_list(obj_desc, ret_buffer); |
264 | 242 | ||
265 | /* On exit, we must delete the object returned by evaluate_object */ | 243 | /* On exit, we must delete the object returned by evaluate_object */ |
266 | 244 | ||
267 | acpi_ut_remove_reference (obj_desc); | 245 | acpi_ut_remove_reference(obj_desc); |
268 | return_ACPI_STATUS (status); | 246 | return_ACPI_STATUS(status); |
269 | } | 247 | } |
270 | 248 | ||
271 | /******************************************************************************* | 249 | /******************************************************************************* |
@@ -287,18 +265,14 @@ acpi_rs_get_method_data ( | |||
287 | ******************************************************************************/ | 265 | ******************************************************************************/ |
288 | 266 | ||
289 | acpi_status | 267 | acpi_status |
290 | acpi_rs_set_srs_method_data ( | 268 | acpi_rs_set_srs_method_data(acpi_handle handle, struct acpi_buffer *in_buffer) |
291 | acpi_handle handle, | ||
292 | struct acpi_buffer *in_buffer) | ||
293 | { | 269 | { |
294 | struct acpi_parameter_info info; | 270 | struct acpi_parameter_info info; |
295 | union acpi_operand_object *params[2]; | 271 | union acpi_operand_object *params[2]; |
296 | acpi_status status; | 272 | acpi_status status; |
297 | struct acpi_buffer buffer; | 273 | struct acpi_buffer buffer; |
298 | |||
299 | |||
300 | ACPI_FUNCTION_TRACE ("rs_set_srs_method_data"); | ||
301 | 274 | ||
275 | ACPI_FUNCTION_TRACE("rs_set_srs_method_data"); | ||
302 | 276 | ||
303 | /* Parameters guaranteed valid by caller */ | 277 | /* Parameters guaranteed valid by caller */ |
304 | 278 | ||
@@ -310,24 +284,24 @@ acpi_rs_set_srs_method_data ( | |||
310 | * Convert the linked list into a byte stream | 284 | * Convert the linked list into a byte stream |
311 | */ | 285 | */ |
312 | buffer.length = ACPI_ALLOCATE_LOCAL_BUFFER; | 286 | buffer.length = ACPI_ALLOCATE_LOCAL_BUFFER; |
313 | status = acpi_rs_create_byte_stream (in_buffer->pointer, &buffer); | 287 | status = acpi_rs_create_byte_stream(in_buffer->pointer, &buffer); |
314 | if (ACPI_FAILURE (status)) { | 288 | if (ACPI_FAILURE(status)) { |
315 | return_ACPI_STATUS (status); | 289 | return_ACPI_STATUS(status); |
316 | } | 290 | } |
317 | 291 | ||
318 | /* Init the param object */ | 292 | /* Init the param object */ |
319 | 293 | ||
320 | params[0] = acpi_ut_create_internal_object (ACPI_TYPE_BUFFER); | 294 | params[0] = acpi_ut_create_internal_object(ACPI_TYPE_BUFFER); |
321 | if (!params[0]) { | 295 | if (!params[0]) { |
322 | acpi_os_free (buffer.pointer); | 296 | acpi_os_free(buffer.pointer); |
323 | return_ACPI_STATUS (AE_NO_MEMORY); | 297 | return_ACPI_STATUS(AE_NO_MEMORY); |
324 | } | 298 | } |
325 | 299 | ||
326 | /* Set up the parameter object */ | 300 | /* Set up the parameter object */ |
327 | 301 | ||
328 | params[0]->buffer.length = (u32) buffer.length; | 302 | params[0]->buffer.length = (u32) buffer.length; |
329 | params[0]->buffer.pointer = buffer.pointer; | 303 | params[0]->buffer.pointer = buffer.pointer; |
330 | params[0]->common.flags = AOPOBJ_DATA_VALID; | 304 | params[0]->common.flags = AOPOBJ_DATA_VALID; |
331 | params[1] = NULL; | 305 | params[1] = NULL; |
332 | 306 | ||
333 | info.node = handle; | 307 | info.node = handle; |
@@ -336,18 +310,17 @@ acpi_rs_set_srs_method_data ( | |||
336 | 310 | ||
337 | /* Execute the method, no return value */ | 311 | /* Execute the method, no return value */ |
338 | 312 | ||
339 | status = acpi_ns_evaluate_relative (METHOD_NAME__SRS, &info); | 313 | status = acpi_ns_evaluate_relative(METHOD_NAME__SRS, &info); |
340 | if (ACPI_SUCCESS (status)) { | 314 | if (ACPI_SUCCESS(status)) { |
341 | /* Delete any return object (especially if implicit_return is enabled) */ | 315 | /* Delete any return object (especially if implicit_return is enabled) */ |
342 | 316 | ||
343 | if (info.return_object) { | 317 | if (info.return_object) { |
344 | acpi_ut_remove_reference (info.return_object); | 318 | acpi_ut_remove_reference(info.return_object); |
345 | } | 319 | } |
346 | } | 320 | } |
347 | 321 | ||
348 | /* Clean up and return the status from acpi_ns_evaluate_relative */ | 322 | /* Clean up and return the status from acpi_ns_evaluate_relative */ |
349 | 323 | ||
350 | acpi_ut_remove_reference (params[0]); | 324 | acpi_ut_remove_reference(params[0]); |
351 | return_ACPI_STATUS (status); | 325 | return_ACPI_STATUS(status); |
352 | } | 326 | } |
353 | |||