diff options
Diffstat (limited to 'drivers/acpi/namespace/nsload.c')
-rw-r--r-- | drivers/acpi/namespace/nsload.c | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/drivers/acpi/namespace/nsload.c b/drivers/acpi/namespace/nsload.c index 4e0b0524c188..fe75d888e183 100644 --- a/drivers/acpi/namespace/nsload.c +++ b/drivers/acpi/namespace/nsload.c | |||
@@ -77,13 +77,14 @@ acpi_ns_load_table(struct acpi_table_desc *table_desc, | |||
77 | { | 77 | { |
78 | acpi_status status; | 78 | acpi_status status; |
79 | 79 | ||
80 | ACPI_FUNCTION_TRACE("ns_load_table"); | 80 | ACPI_FUNCTION_TRACE(ns_load_table); |
81 | 81 | ||
82 | /* Check if table contains valid AML (must be DSDT, PSDT, SSDT, etc.) */ | 82 | /* Check if table contains valid AML (must be DSDT, PSDT, SSDT, etc.) */ |
83 | 83 | ||
84 | if (! | 84 | if (! |
85 | (acpi_gbl_table_data[table_desc->type]. | 85 | (acpi_gbl_table_data[table_desc->type]. |
86 | flags & ACPI_TABLE_EXECUTABLE)) { | 86 | flags & ACPI_TABLE_EXECUTABLE)) { |
87 | |||
87 | /* Just ignore this table */ | 88 | /* Just ignore this table */ |
88 | 89 | ||
89 | return_ACPI_STATUS(AE_OK); | 90 | return_ACPI_STATUS(AE_OK); |
@@ -168,7 +169,7 @@ static acpi_status acpi_ns_load_table_by_type(acpi_table_type table_type) | |||
168 | acpi_status status; | 169 | acpi_status status; |
169 | struct acpi_table_desc *table_desc; | 170 | struct acpi_table_desc *table_desc; |
170 | 171 | ||
171 | ACPI_FUNCTION_TRACE("ns_load_table_by_type"); | 172 | ACPI_FUNCTION_TRACE(ns_load_table_by_type); |
172 | 173 | ||
173 | status = acpi_ut_acquire_mutex(ACPI_MTX_TABLES); | 174 | status = acpi_ut_acquire_mutex(ACPI_MTX_TABLES); |
174 | if (ACPI_FAILURE(status)) { | 175 | if (ACPI_FAILURE(status)) { |
@@ -180,11 +181,11 @@ static acpi_status acpi_ns_load_table_by_type(acpi_table_type table_type) | |||
180 | * DSDT (one), SSDT/PSDT (multiple) | 181 | * DSDT (one), SSDT/PSDT (multiple) |
181 | */ | 182 | */ |
182 | switch (table_type) { | 183 | switch (table_type) { |
183 | case ACPI_TABLE_DSDT: | 184 | case ACPI_TABLE_ID_DSDT: |
184 | 185 | ||
185 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Namespace load: DSDT\n")); | 186 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Namespace load: DSDT\n")); |
186 | 187 | ||
187 | table_desc = acpi_gbl_table_lists[ACPI_TABLE_DSDT].next; | 188 | table_desc = acpi_gbl_table_lists[ACPI_TABLE_ID_DSDT].next; |
188 | 189 | ||
189 | /* If table already loaded into namespace, just return */ | 190 | /* If table already loaded into namespace, just return */ |
190 | 191 | ||
@@ -200,8 +201,8 @@ static acpi_status acpi_ns_load_table_by_type(acpi_table_type table_type) | |||
200 | } | 201 | } |
201 | break; | 202 | break; |
202 | 203 | ||
203 | case ACPI_TABLE_SSDT: | 204 | case ACPI_TABLE_ID_SSDT: |
204 | case ACPI_TABLE_PSDT: | 205 | case ACPI_TABLE_ID_PSDT: |
205 | 206 | ||
206 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, | 207 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, |
207 | "Namespace load: %d SSDT or PSDTs\n", | 208 | "Namespace load: %d SSDT or PSDTs\n", |
@@ -258,7 +259,7 @@ acpi_status acpi_ns_load_namespace(void) | |||
258 | { | 259 | { |
259 | acpi_status status; | 260 | acpi_status status; |
260 | 261 | ||
261 | ACPI_FUNCTION_TRACE("acpi_load_name_space"); | 262 | ACPI_FUNCTION_TRACE(acpi_load_name_space); |
262 | 263 | ||
263 | /* There must be at least a DSDT installed */ | 264 | /* There must be at least a DSDT installed */ |
264 | 265 | ||
@@ -271,15 +272,15 @@ acpi_status acpi_ns_load_namespace(void) | |||
271 | * Load the namespace. The DSDT is required, | 272 | * Load the namespace. The DSDT is required, |
272 | * but the SSDT and PSDT tables are optional. | 273 | * but the SSDT and PSDT tables are optional. |
273 | */ | 274 | */ |
274 | status = acpi_ns_load_table_by_type(ACPI_TABLE_DSDT); | 275 | status = acpi_ns_load_table_by_type(ACPI_TABLE_ID_DSDT); |
275 | if (ACPI_FAILURE(status)) { | 276 | if (ACPI_FAILURE(status)) { |
276 | return_ACPI_STATUS(status); | 277 | return_ACPI_STATUS(status); |
277 | } | 278 | } |
278 | 279 | ||
279 | /* Ignore exceptions from these */ | 280 | /* Ignore exceptions from these */ |
280 | 281 | ||
281 | (void)acpi_ns_load_table_by_type(ACPI_TABLE_SSDT); | 282 | (void)acpi_ns_load_table_by_type(ACPI_TABLE_ID_SSDT); |
282 | (void)acpi_ns_load_table_by_type(ACPI_TABLE_PSDT); | 283 | (void)acpi_ns_load_table_by_type(ACPI_TABLE_ID_PSDT); |
283 | 284 | ||
284 | ACPI_DEBUG_PRINT_RAW((ACPI_DB_INIT, | 285 | ACPI_DEBUG_PRINT_RAW((ACPI_DB_INIT, |
285 | "ACPI Namespace successfully loaded at root %p\n", | 286 | "ACPI Namespace successfully loaded at root %p\n", |
@@ -314,7 +315,7 @@ static acpi_status acpi_ns_delete_subtree(acpi_handle start_handle) | |||
314 | acpi_handle dummy; | 315 | acpi_handle dummy; |
315 | u32 level; | 316 | u32 level; |
316 | 317 | ||
317 | ACPI_FUNCTION_TRACE("ns_delete_subtree"); | 318 | ACPI_FUNCTION_TRACE(ns_delete_subtree); |
318 | 319 | ||
319 | parent_handle = start_handle; | 320 | parent_handle = start_handle; |
320 | child_handle = NULL; | 321 | child_handle = NULL; |
@@ -325,6 +326,7 @@ static acpi_status acpi_ns_delete_subtree(acpi_handle start_handle) | |||
325 | * to where we started. | 326 | * to where we started. |
326 | */ | 327 | */ |
327 | while (level > 0) { | 328 | while (level > 0) { |
329 | |||
328 | /* Attempt to get the next object in this scope */ | 330 | /* Attempt to get the next object in this scope */ |
329 | 331 | ||
330 | status = acpi_get_next_object(ACPI_TYPE_ANY, parent_handle, | 332 | status = acpi_get_next_object(ACPI_TYPE_ANY, parent_handle, |
@@ -335,6 +337,7 @@ static acpi_status acpi_ns_delete_subtree(acpi_handle start_handle) | |||
335 | /* Did we get a new object? */ | 337 | /* Did we get a new object? */ |
336 | 338 | ||
337 | if (ACPI_SUCCESS(status)) { | 339 | if (ACPI_SUCCESS(status)) { |
340 | |||
338 | /* Check if this object has any children */ | 341 | /* Check if this object has any children */ |
339 | 342 | ||
340 | if (ACPI_SUCCESS | 343 | if (ACPI_SUCCESS |
@@ -392,7 +395,7 @@ acpi_status acpi_ns_unload_namespace(acpi_handle handle) | |||
392 | { | 395 | { |
393 | acpi_status status; | 396 | acpi_status status; |
394 | 397 | ||
395 | ACPI_FUNCTION_TRACE("ns_unload_name_space"); | 398 | ACPI_FUNCTION_TRACE(ns_unload_name_space); |
396 | 399 | ||
397 | /* Parameter validation */ | 400 | /* Parameter validation */ |
398 | 401 | ||