diff options
Diffstat (limited to 'drivers/acpi/namespace')
| -rw-r--r-- | drivers/acpi/namespace/nsaccess.c | 35 | ||||
| -rw-r--r-- | drivers/acpi/namespace/nsalloc.c | 11 | ||||
| -rw-r--r-- | drivers/acpi/namespace/nsdump.c | 13 | ||||
| -rw-r--r-- | drivers/acpi/namespace/nsdumpdv.c | 2 | ||||
| -rw-r--r-- | drivers/acpi/namespace/nseval.c | 5 | ||||
| -rw-r--r-- | drivers/acpi/namespace/nsinit.c | 105 | ||||
| -rw-r--r-- | drivers/acpi/namespace/nsload.c | 10 | ||||
| -rw-r--r-- | drivers/acpi/namespace/nsnames.c | 14 | ||||
| -rw-r--r-- | drivers/acpi/namespace/nsobject.c | 13 | ||||
| -rw-r--r-- | drivers/acpi/namespace/nsparse.c | 2 | ||||
| -rw-r--r-- | drivers/acpi/namespace/nssearch.c | 30 | ||||
| -rw-r--r-- | drivers/acpi/namespace/nsutils.c | 43 | ||||
| -rw-r--r-- | drivers/acpi/namespace/nswalk.c | 2 | ||||
| -rw-r--r-- | drivers/acpi/namespace/nsxfeval.c | 29 | ||||
| -rw-r--r-- | drivers/acpi/namespace/nsxfname.c | 5 | ||||
| -rw-r--r-- | drivers/acpi/namespace/nsxfobj.c | 2 |
16 files changed, 166 insertions, 155 deletions
diff --git a/drivers/acpi/namespace/nsaccess.c b/drivers/acpi/namespace/nsaccess.c index edfbe34600f5..1149bc18fb35 100644 --- a/drivers/acpi/namespace/nsaccess.c +++ b/drivers/acpi/namespace/nsaccess.c | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | ******************************************************************************/ | 5 | ******************************************************************************/ |
| 6 | 6 | ||
| 7 | /* | 7 | /* |
| 8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
| 9 | * All rights reserved. | 9 | * All rights reserved. |
| 10 | * | 10 | * |
| 11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
| @@ -110,10 +110,9 @@ acpi_status acpi_ns_root_initialize(void) | |||
| 110 | ACPI_NS_NO_UPSEARCH, NULL, &new_node); | 110 | ACPI_NS_NO_UPSEARCH, NULL, &new_node); |
| 111 | 111 | ||
| 112 | if (ACPI_FAILURE(status) || (!new_node)) { /* Must be on same line for code converter */ | 112 | if (ACPI_FAILURE(status) || (!new_node)) { /* Must be on same line for code converter */ |
| 113 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 113 | ACPI_EXCEPTION((AE_INFO, status, |
| 114 | "Could not create predefined name %s, %s\n", | 114 | "Could not create predefined name %s", |
| 115 | init_val->name, | 115 | init_val->name)); |
| 116 | acpi_format_exception(status))); | ||
| 117 | } | 116 | } |
| 118 | 117 | ||
| 119 | /* | 118 | /* |
| @@ -124,9 +123,9 @@ acpi_status acpi_ns_root_initialize(void) | |||
| 124 | if (init_val->val) { | 123 | if (init_val->val) { |
| 125 | status = acpi_os_predefined_override(init_val, &val); | 124 | status = acpi_os_predefined_override(init_val, &val); |
| 126 | if (ACPI_FAILURE(status)) { | 125 | if (ACPI_FAILURE(status)) { |
| 127 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 126 | ACPI_ERROR((AE_INFO, |
| 128 | "Could not override predefined %s\n", | 127 | "Could not override predefined %s", |
| 129 | init_val->name)); | 128 | init_val->name)); |
| 130 | } | 129 | } |
| 131 | 130 | ||
| 132 | if (!val) { | 131 | if (!val) { |
| @@ -233,7 +232,9 @@ acpi_status acpi_ns_root_initialize(void) | |||
| 233 | 232 | ||
| 234 | default: | 233 | default: |
| 235 | 234 | ||
| 236 | ACPI_REPORT_ERROR(("Unsupported initial type value %X\n", init_val->type)); | 235 | ACPI_ERROR((AE_INFO, |
| 236 | "Unsupported initial type value %X", | ||
| 237 | init_val->type)); | ||
| 237 | acpi_ut_remove_reference(obj_desc); | 238 | acpi_ut_remove_reference(obj_desc); |
| 238 | obj_desc = NULL; | 239 | obj_desc = NULL; |
| 239 | continue; | 240 | continue; |
| @@ -339,7 +340,9 @@ acpi_ns_lookup(union acpi_generic_state *scope_info, | |||
| 339 | prefix_node = scope_info->scope.node; | 340 | prefix_node = scope_info->scope.node; |
| 340 | if (ACPI_GET_DESCRIPTOR_TYPE(prefix_node) != | 341 | if (ACPI_GET_DESCRIPTOR_TYPE(prefix_node) != |
| 341 | ACPI_DESC_TYPE_NAMED) { | 342 | ACPI_DESC_TYPE_NAMED) { |
| 342 | ACPI_REPORT_ERROR(("ns_lookup: %p is not a namespace node [%s]\n", prefix_node, acpi_ut_get_descriptor_name(prefix_node))); | 343 | ACPI_ERROR((AE_INFO, "%p is not a namespace node [%s]", |
| 344 | prefix_node, | ||
| 345 | acpi_ut_get_descriptor_name(prefix_node))); | ||
| 343 | return_ACPI_STATUS(AE_AML_INTERNAL); | 346 | return_ACPI_STATUS(AE_AML_INTERNAL); |
| 344 | } | 347 | } |
| 345 | 348 | ||
| @@ -429,7 +432,8 @@ acpi_ns_lookup(union acpi_generic_state *scope_info, | |||
| 429 | if (!this_node) { | 432 | if (!this_node) { |
| 430 | /* Current scope has no parent scope */ | 433 | /* Current scope has no parent scope */ |
| 431 | 434 | ||
| 432 | ACPI_REPORT_ERROR(("ACPI path has too many parent prefixes (^) - reached beyond root node\n")); | 435 | ACPI_ERROR((AE_INFO, |
| 436 | "ACPI path has too many parent prefixes (^) - reached beyond root node")); | ||
| 433 | return_ACPI_STATUS(AE_NOT_FOUND); | 437 | return_ACPI_STATUS(AE_NOT_FOUND); |
| 434 | } | 438 | } |
| 435 | } | 439 | } |
| @@ -498,7 +502,7 @@ acpi_ns_lookup(union acpi_generic_state *scope_info, | |||
| 498 | path++; | 502 | path++; |
| 499 | 503 | ||
| 500 | ACPI_DEBUG_PRINT((ACPI_DB_NAMES, | 504 | ACPI_DEBUG_PRINT((ACPI_DB_NAMES, |
| 501 | "Multi Pathname (%d Segments, Flags=%X) \n", | 505 | "Multi Pathname (%d Segments, Flags=%X)\n", |
| 502 | num_segments, flags)); | 506 | num_segments, flags)); |
| 503 | break; | 507 | break; |
| 504 | 508 | ||
| @@ -600,7 +604,12 @@ acpi_ns_lookup(union acpi_generic_state *scope_info, | |||
| 600 | (this_node->type != type_to_check_for)) { | 604 | (this_node->type != type_to_check_for)) { |
| 601 | /* Complain about a type mismatch */ | 605 | /* Complain about a type mismatch */ |
| 602 | 606 | ||
| 603 | ACPI_REPORT_WARNING(("ns_lookup: Type mismatch on %4.4s (%s), searching for (%s)\n", (char *)&simple_name, acpi_ut_get_type_name(this_node->type), acpi_ut_get_type_name(type_to_check_for))); | 607 | ACPI_WARNING((AE_INFO, |
| 608 | "ns_lookup: Type mismatch on %4.4s (%s), searching for (%s)", | ||
| 609 | ACPI_CAST_PTR(char, &simple_name), | ||
| 610 | acpi_ut_get_type_name(this_node->type), | ||
| 611 | acpi_ut_get_type_name | ||
| 612 | (type_to_check_for))); | ||
| 604 | } | 613 | } |
| 605 | 614 | ||
| 606 | /* | 615 | /* |
diff --git a/drivers/acpi/namespace/nsalloc.c b/drivers/acpi/namespace/nsalloc.c index cc7a85f8cfe6..9b871f38b61b 100644 --- a/drivers/acpi/namespace/nsalloc.c +++ b/drivers/acpi/namespace/nsalloc.c | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | ******************************************************************************/ | 5 | ******************************************************************************/ |
| 6 | 6 | ||
| 7 | /* | 7 | /* |
| 8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
| 9 | * All rights reserved. | 9 | * All rights reserved. |
| 10 | * | 10 | * |
| 11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
| @@ -272,9 +272,8 @@ void acpi_ns_delete_children(struct acpi_namespace_node *parent_node) | |||
| 272 | /* Grandchildren should have all been deleted already */ | 272 | /* Grandchildren should have all been deleted already */ |
| 273 | 273 | ||
| 274 | if (child_node->child) { | 274 | if (child_node->child) { |
| 275 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 275 | ACPI_ERROR((AE_INFO, "Found a grandchild! P=%p C=%p", |
| 276 | "Found a grandchild! P=%p C=%p\n", | 276 | parent_node, child_node)); |
| 277 | parent_node, child_node)); | ||
| 278 | } | 277 | } |
| 279 | 278 | ||
| 280 | /* Now we can free this child object */ | 279 | /* Now we can free this child object */ |
| @@ -302,7 +301,9 @@ void acpi_ns_delete_children(struct acpi_namespace_node *parent_node) | |||
| 302 | /* There should be only one reference remaining on this node */ | 301 | /* There should be only one reference remaining on this node */ |
| 303 | 302 | ||
| 304 | if (child_node->reference_count != 1) { | 303 | if (child_node->reference_count != 1) { |
| 305 | ACPI_REPORT_WARNING(("Existing references (%d) on node being deleted (%p)\n", child_node->reference_count, child_node)); | 304 | ACPI_WARNING((AE_INFO, |
| 305 | "Existing references (%d) on node being deleted (%p)", | ||
| 306 | child_node->reference_count, child_node)); | ||
| 306 | } | 307 | } |
| 307 | 308 | ||
| 308 | /* Now we can delete the node */ | 309 | /* Now we can delete the node */ |
diff --git a/drivers/acpi/namespace/nsdump.c b/drivers/acpi/namespace/nsdump.c index 9faf1d5c86ed..a2807317a84b 100644 --- a/drivers/acpi/namespace/nsdump.c +++ b/drivers/acpi/namespace/nsdump.c | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
| 6 | 6 | ||
| 7 | /* | 7 | /* |
| 8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
| 9 | * All rights reserved. | 9 | * All rights reserved. |
| 10 | * | 10 | * |
| 11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
| @@ -198,12 +198,13 @@ acpi_ns_dump_one_object(acpi_handle obj_handle, | |||
| 198 | /* Check the node type and name */ | 198 | /* Check the node type and name */ |
| 199 | 199 | ||
| 200 | if (type > ACPI_TYPE_LOCAL_MAX) { | 200 | if (type > ACPI_TYPE_LOCAL_MAX) { |
| 201 | ACPI_REPORT_WARNING(("Invalid ACPI Type %08X\n", type)); | 201 | ACPI_WARNING((AE_INFO, "Invalid ACPI Object Type %08X", |
| 202 | type)); | ||
| 202 | } | 203 | } |
| 203 | 204 | ||
| 204 | if (!acpi_ut_valid_acpi_name(this_node->name.integer)) { | 205 | if (!acpi_ut_valid_acpi_name(this_node->name.integer)) { |
| 205 | ACPI_REPORT_WARNING(("Invalid ACPI Name %08X\n", | 206 | ACPI_WARNING((AE_INFO, "Invalid ACPI Name %08X", |
| 206 | this_node->name.integer)); | 207 | this_node->name.integer)); |
| 207 | } | 208 | } |
| 208 | 209 | ||
| 209 | acpi_os_printf("%4.4s", acpi_ut_get_node_name(this_node)); | 210 | acpi_os_printf("%4.4s", acpi_ut_get_node_name(this_node)); |
| @@ -212,7 +213,9 @@ acpi_ns_dump_one_object(acpi_handle obj_handle, | |||
| 212 | /* | 213 | /* |
| 213 | * Now we can print out the pertinent information | 214 | * Now we can print out the pertinent information |
| 214 | */ | 215 | */ |
| 215 | acpi_os_printf(" %-12s %p ", acpi_ut_get_type_name(type), this_node); | 216 | acpi_os_printf(" %-12s %p %2.2X ", |
| 217 | acpi_ut_get_type_name(type), this_node, | ||
| 218 | this_node->owner_id); | ||
| 216 | 219 | ||
| 217 | dbg_level = acpi_dbg_level; | 220 | dbg_level = acpi_dbg_level; |
| 218 | acpi_dbg_level = 0; | 221 | acpi_dbg_level = 0; |
diff --git a/drivers/acpi/namespace/nsdumpdv.c b/drivers/acpi/namespace/nsdumpdv.c index 55de883943d6..aff899a935e3 100644 --- a/drivers/acpi/namespace/nsdumpdv.c +++ b/drivers/acpi/namespace/nsdumpdv.c | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
| 6 | 6 | ||
| 7 | /* | 7 | /* |
| 8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
| 9 | * All rights reserved. | 9 | * All rights reserved. |
| 10 | * | 10 | * |
| 11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
diff --git a/drivers/acpi/namespace/nseval.c b/drivers/acpi/namespace/nseval.c index 0191c7d92824..19d7b94d40c3 100644 --- a/drivers/acpi/namespace/nseval.c +++ b/drivers/acpi/namespace/nseval.c | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | ******************************************************************************/ | 6 | ******************************************************************************/ |
| 7 | 7 | ||
| 8 | /* | 8 | /* |
| 9 | * Copyright (C) 2000 - 2005, R. Byron Moore | 9 | * Copyright (C) 2000 - 2006, R. Byron Moore |
| 10 | * All rights reserved. | 10 | * All rights reserved. |
| 11 | * | 11 | * |
| 12 | * Redistribution and use in source and binary forms, with or without | 12 | * Redistribution and use in source and binary forms, with or without |
| @@ -373,8 +373,7 @@ acpi_ns_execute_control_method(struct acpi_parameter_info *info) | |||
| 373 | 373 | ||
| 374 | info->obj_desc = acpi_ns_get_attached_object(info->node); | 374 | info->obj_desc = acpi_ns_get_attached_object(info->node); |
| 375 | if (!info->obj_desc) { | 375 | if (!info->obj_desc) { |
| 376 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 376 | ACPI_ERROR((AE_INFO, "No attached method object")); |
| 377 | "No attached method object\n")); | ||
| 378 | 377 | ||
| 379 | (void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE); | 378 | (void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE); |
| 380 | return_ACPI_STATUS(AE_NULL_OBJECT); | 379 | return_ACPI_STATUS(AE_NULL_OBJECT); |
diff --git a/drivers/acpi/namespace/nsinit.c b/drivers/acpi/namespace/nsinit.c index 0a08d2f04a06..9f929e479fd8 100644 --- a/drivers/acpi/namespace/nsinit.c +++ b/drivers/acpi/namespace/nsinit.c | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
| 6 | 6 | ||
| 7 | /* | 7 | /* |
| 8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
| 9 | * All rights reserved. | 9 | * All rights reserved. |
| 10 | * | 10 | * |
| 11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
| @@ -93,8 +93,7 @@ acpi_status acpi_ns_initialize_objects(void) | |||
| 93 | ACPI_UINT32_MAX, acpi_ns_init_one_object, | 93 | ACPI_UINT32_MAX, acpi_ns_init_one_object, |
| 94 | &info, NULL); | 94 | &info, NULL); |
| 95 | if (ACPI_FAILURE(status)) { | 95 | if (ACPI_FAILURE(status)) { |
| 96 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "walk_namespace failed! %s\n", | 96 | ACPI_EXCEPTION((AE_INFO, status, "During walk_namespace")); |
| 97 | acpi_format_exception(status))); | ||
| 98 | } | 97 | } |
| 99 | 98 | ||
| 100 | ACPI_DEBUG_PRINT_RAW((ACPI_DB_INIT, | 99 | ACPI_DEBUG_PRINT_RAW((ACPI_DB_INIT, |
| @@ -159,12 +158,11 @@ acpi_status acpi_ns_initialize_devices(void) | |||
| 159 | (void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE); | 158 | (void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE); |
| 160 | 159 | ||
| 161 | if (ACPI_FAILURE(status)) { | 160 | if (ACPI_FAILURE(status)) { |
| 162 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "walk_namespace failed! %s\n", | 161 | ACPI_EXCEPTION((AE_INFO, status, "During walk_namespace")); |
| 163 | acpi_format_exception(status))); | ||
| 164 | } | 162 | } |
| 165 | 163 | ||
| 166 | ACPI_DEBUG_PRINT_RAW((ACPI_DB_INIT, | 164 | ACPI_DEBUG_PRINT_RAW((ACPI_DB_INIT, |
| 167 | "\n%hd Devices found containing: %hd _STA, %hd _INI methods\n", | 165 | "\n%hd Devices found - executed %hd _STA, %hd _INI methods\n", |
| 168 | info.device_count, info.num_STA, info.num_INI)); | 166 | info.device_count, info.num_STA, info.num_INI)); |
| 169 | 167 | ||
| 170 | return_ACPI_STATUS(status); | 168 | return_ACPI_STATUS(status); |
| @@ -289,12 +287,10 @@ acpi_ns_init_one_object(acpi_handle obj_handle, | |||
| 289 | } | 287 | } |
| 290 | 288 | ||
| 291 | if (ACPI_FAILURE(status)) { | 289 | if (ACPI_FAILURE(status)) { |
| 292 | ACPI_DEBUG_PRINT_RAW((ACPI_DB_ERROR, "\n")); | 290 | ACPI_EXCEPTION((AE_INFO, status, |
| 293 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 291 | "Could not execute arguments for [%4.4s] (%s)", |
| 294 | "Could not execute arguments for [%4.4s] (%s), %s\n", | 292 | acpi_ut_get_node_name(node), |
| 295 | acpi_ut_get_node_name(node), | 293 | acpi_ut_get_type_name(type))); |
| 296 | acpi_ut_get_type_name(type), | ||
| 297 | acpi_format_exception(status))); | ||
| 298 | } | 294 | } |
| 299 | 295 | ||
| 300 | /* | 296 | /* |
| @@ -336,23 +332,22 @@ acpi_ns_init_one_device(acpi_handle obj_handle, | |||
| 336 | struct acpi_parameter_info pinfo; | 332 | struct acpi_parameter_info pinfo; |
| 337 | u32 flags; | 333 | u32 flags; |
| 338 | acpi_status status; | 334 | acpi_status status; |
| 335 | struct acpi_namespace_node *ini_node; | ||
| 336 | struct acpi_namespace_node *device_node; | ||
| 339 | 337 | ||
| 340 | ACPI_FUNCTION_TRACE("ns_init_one_device"); | 338 | ACPI_FUNCTION_TRACE("ns_init_one_device"); |
| 341 | 339 | ||
| 342 | pinfo.parameters = NULL; | 340 | device_node = acpi_ns_map_handle_to_node(obj_handle); |
| 343 | pinfo.parameter_type = ACPI_PARAM_ARGS; | 341 | if (!device_node) { |
| 344 | |||
| 345 | pinfo.node = acpi_ns_map_handle_to_node(obj_handle); | ||
| 346 | if (!pinfo.node) { | ||
| 347 | return_ACPI_STATUS(AE_BAD_PARAMETER); | 342 | return_ACPI_STATUS(AE_BAD_PARAMETER); |
| 348 | } | 343 | } |
| 349 | 344 | ||
| 350 | /* | 345 | /* |
| 351 | * We will run _STA/_INI on Devices, Processors and thermal_zones only | 346 | * We will run _STA/_INI on Devices, Processors and thermal_zones only |
| 352 | */ | 347 | */ |
| 353 | if ((pinfo.node->type != ACPI_TYPE_DEVICE) && | 348 | if ((device_node->type != ACPI_TYPE_DEVICE) && |
| 354 | (pinfo.node->type != ACPI_TYPE_PROCESSOR) && | 349 | (device_node->type != ACPI_TYPE_PROCESSOR) && |
| 355 | (pinfo.node->type != ACPI_TYPE_THERMAL)) { | 350 | (device_node->type != ACPI_TYPE_THERMAL)) { |
| 356 | return_ACPI_STATUS(AE_OK); | 351 | return_ACPI_STATUS(AE_OK); |
| 357 | } | 352 | } |
| 358 | 353 | ||
| @@ -364,57 +359,69 @@ acpi_ns_init_one_device(acpi_handle obj_handle, | |||
| 364 | info->device_count++; | 359 | info->device_count++; |
| 365 | 360 | ||
| 366 | /* | 361 | /* |
| 367 | * Run _STA to determine if we can run _INI on the device. | 362 | * Check if the _INI method exists for this device - |
| 363 | * if _INI does not exist, there is no need to run _STA | ||
| 364 | * No _INI means device requires no initialization | ||
| 365 | */ | ||
| 366 | status = acpi_ns_search_node(*ACPI_CAST_PTR(u32, METHOD_NAME__INI), | ||
| 367 | device_node, ACPI_TYPE_METHOD, &ini_node); | ||
| 368 | if (ACPI_FAILURE(status)) { | ||
| 369 | /* No _INI method found - move on to next device */ | ||
| 370 | |||
| 371 | return_ACPI_STATUS(AE_OK); | ||
| 372 | } | ||
| 373 | |||
| 374 | /* | ||
| 375 | * Run _STA to determine if we can run _INI on the device - | ||
| 376 | * the device must be present before _INI can be run. | ||
| 377 | * However, _STA is not required - assume device present if no _STA | ||
| 368 | */ | 378 | */ |
| 369 | ACPI_DEBUG_EXEC(acpi_ut_display_init_pathname(ACPI_TYPE_METHOD, | 379 | ACPI_DEBUG_EXEC(acpi_ut_display_init_pathname(ACPI_TYPE_METHOD, |
| 370 | pinfo.node, | 380 | device_node, |
| 371 | METHOD_NAME__STA)); | 381 | METHOD_NAME__STA)); |
| 372 | status = acpi_ut_execute_STA(pinfo.node, &flags); | ||
| 373 | 382 | ||
| 383 | pinfo.node = device_node; | ||
| 384 | pinfo.parameters = NULL; | ||
| 385 | pinfo.parameter_type = ACPI_PARAM_ARGS; | ||
| 386 | |||
| 387 | status = acpi_ut_execute_STA(pinfo.node, &flags); | ||
| 374 | if (ACPI_FAILURE(status)) { | 388 | if (ACPI_FAILURE(status)) { |
| 375 | if (pinfo.node->type == ACPI_TYPE_DEVICE) { | 389 | /* Ignore error and move on to next device */ |
| 376 | /* Ignore error and move on to next device */ | ||
| 377 | 390 | ||
| 378 | return_ACPI_STATUS(AE_OK); | 391 | return_ACPI_STATUS(AE_OK); |
| 379 | } | 392 | } |
| 380 | 393 | ||
| 381 | /* _STA is not required for Processor or thermal_zone objects */ | 394 | if (flags != ACPI_UINT32_MAX) { |
| 382 | } else { | ||
| 383 | info->num_STA++; | 395 | info->num_STA++; |
| 396 | } | ||
| 384 | 397 | ||
| 385 | if (!(flags & 0x01)) { | 398 | if (!(flags & ACPI_STA_DEVICE_PRESENT)) { |
| 386 | /* Don't look at children of a not present device */ | 399 | /* Don't look at children of a not present device */ |
| 387 | 400 | ||
| 388 | return_ACPI_STATUS(AE_CTRL_DEPTH); | 401 | return_ACPI_STATUS(AE_CTRL_DEPTH); |
| 389 | } | ||
| 390 | } | 402 | } |
| 391 | 403 | ||
| 392 | /* | 404 | /* |
| 393 | * The device is present. Run _INI. | 405 | * The device is present and _INI exists. Run the _INI method. |
| 406 | * (We already have the _INI node from above) | ||
| 394 | */ | 407 | */ |
| 395 | ACPI_DEBUG_EXEC(acpi_ut_display_init_pathname(ACPI_TYPE_METHOD, | 408 | ACPI_DEBUG_EXEC(acpi_ut_display_init_pathname(ACPI_TYPE_METHOD, |
| 396 | pinfo.node, | 409 | pinfo.node, |
| 397 | METHOD_NAME__INI)); | 410 | METHOD_NAME__INI)); |
| 398 | status = acpi_ns_evaluate_relative(METHOD_NAME__INI, &pinfo); | ||
| 399 | if (ACPI_FAILURE(status)) { | ||
| 400 | /* No _INI (AE_NOT_FOUND) means device requires no initialization */ | ||
| 401 | 411 | ||
| 402 | if (status != AE_NOT_FOUND) { | 412 | pinfo.node = ini_node; |
| 403 | /* Ignore error and move on to next device */ | 413 | status = acpi_ns_evaluate_by_handle(&pinfo); |
| 414 | if (ACPI_FAILURE(status)) { | ||
| 415 | /* Ignore error and move on to next device */ | ||
| 404 | 416 | ||
| 405 | #ifdef ACPI_DEBUG_OUTPUT | 417 | #ifdef ACPI_DEBUG_OUTPUT |
| 406 | char *scope_name = | 418 | char *scope_name = acpi_ns_get_external_pathname(ini_node); |
| 407 | acpi_ns_get_external_pathname(pinfo.node); | ||
| 408 | 419 | ||
| 409 | ACPI_DEBUG_PRINT((ACPI_DB_WARN, "%s._INI failed: %s\n", | 420 | ACPI_WARNING((AE_INFO, "%s._INI failed: %s", |
| 410 | scope_name, | 421 | scope_name, acpi_format_exception(status))); |
| 411 | acpi_format_exception(status))); | ||
| 412 | 422 | ||
| 413 | ACPI_MEM_FREE(scope_name); | 423 | ACPI_MEM_FREE(scope_name); |
| 414 | #endif | 424 | #endif |
| 415 | } | ||
| 416 | |||
| 417 | status = AE_OK; | ||
| 418 | } else { | 425 | } else { |
| 419 | /* Delete any return object (especially if implicit_return is enabled) */ | 426 | /* Delete any return object (especially if implicit_return is enabled) */ |
| 420 | 427 | ||
| @@ -434,5 +441,5 @@ acpi_ns_init_one_device(acpi_handle obj_handle, | |||
| 434 | acpi_gbl_init_handler(pinfo.node, ACPI_INIT_DEVICE_INI); | 441 | acpi_gbl_init_handler(pinfo.node, ACPI_INIT_DEVICE_INI); |
| 435 | } | 442 | } |
| 436 | 443 | ||
| 437 | return_ACPI_STATUS(status); | 444 | return_ACPI_STATUS(AE_OK); |
| 438 | } | 445 | } |
diff --git a/drivers/acpi/namespace/nsload.c b/drivers/acpi/namespace/nsload.c index c28849de465a..4e0b0524c188 100644 --- a/drivers/acpi/namespace/nsload.c +++ b/drivers/acpi/namespace/nsload.c | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
| 6 | 6 | ||
| 7 | /* | 7 | /* |
| 8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
| 9 | * All rights reserved. | 9 | * All rights reserved. |
| 10 | * | 10 | * |
| 11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
| @@ -92,7 +92,7 @@ acpi_ns_load_table(struct acpi_table_desc *table_desc, | |||
| 92 | /* Check validity of the AML start and length */ | 92 | /* Check validity of the AML start and length */ |
| 93 | 93 | ||
| 94 | if (!table_desc->aml_start) { | 94 | if (!table_desc->aml_start) { |
| 95 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Null AML pointer\n")); | 95 | ACPI_ERROR((AE_INFO, "Null AML pointer")); |
| 96 | return_ACPI_STATUS(AE_BAD_PARAMETER); | 96 | return_ACPI_STATUS(AE_BAD_PARAMETER); |
| 97 | } | 97 | } |
| 98 | 98 | ||
| @@ -102,8 +102,8 @@ acpi_ns_load_table(struct acpi_table_desc *table_desc, | |||
| 102 | /* Ignore table if there is no AML contained within */ | 102 | /* Ignore table if there is no AML contained within */ |
| 103 | 103 | ||
| 104 | if (!table_desc->aml_length) { | 104 | if (!table_desc->aml_length) { |
| 105 | ACPI_REPORT_WARNING(("Zero-length AML block in table [%4.4s]\n", | 105 | ACPI_WARNING((AE_INFO, "Zero-length AML block in table [%4.4s]", |
| 106 | table_desc->pointer->signature)); | 106 | table_desc->pointer->signature)); |
| 107 | return_ACPI_STATUS(AE_OK); | 107 | return_ACPI_STATUS(AE_OK); |
| 108 | } | 108 | } |
| 109 | 109 | ||
| @@ -263,7 +263,7 @@ acpi_status acpi_ns_load_namespace(void) | |||
| 263 | /* There must be at least a DSDT installed */ | 263 | /* There must be at least a DSDT installed */ |
| 264 | 264 | ||
| 265 | if (acpi_gbl_DSDT == NULL) { | 265 | if (acpi_gbl_DSDT == NULL) { |
| 266 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "DSDT is not in memory\n")); | 266 | ACPI_ERROR((AE_INFO, "DSDT is not in memory")); |
| 267 | return_ACPI_STATUS(AE_NO_ACPI_TABLES); | 267 | return_ACPI_STATUS(AE_NO_ACPI_TABLES); |
| 268 | } | 268 | } |
| 269 | 269 | ||
diff --git a/drivers/acpi/namespace/nsnames.c b/drivers/acpi/namespace/nsnames.c index d5e8dea61c27..639f653b4b6b 100644 --- a/drivers/acpi/namespace/nsnames.c +++ b/drivers/acpi/namespace/nsnames.c | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | ******************************************************************************/ | 5 | ******************************************************************************/ |
| 6 | 6 | ||
| 7 | /* | 7 | /* |
| 8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
| 9 | * All rights reserved. | 9 | * All rights reserved. |
| 10 | * | 10 | * |
| 11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
| @@ -75,7 +75,7 @@ acpi_ns_build_external_path(struct acpi_namespace_node *node, | |||
| 75 | acpi_size index; | 75 | acpi_size index; |
| 76 | struct acpi_namespace_node *parent_node; | 76 | struct acpi_namespace_node *parent_node; |
| 77 | 77 | ||
| 78 | ACPI_FUNCTION_NAME("ns_build_external_path"); | 78 | ACPI_FUNCTION_ENTRY(); |
| 79 | 79 | ||
| 80 | /* Special case for root */ | 80 | /* Special case for root */ |
| 81 | 81 | ||
| @@ -110,9 +110,9 @@ acpi_ns_build_external_path(struct acpi_namespace_node *node, | |||
| 110 | name_buffer[index] = AML_ROOT_PREFIX; | 110 | name_buffer[index] = AML_ROOT_PREFIX; |
| 111 | 111 | ||
| 112 | if (index != 0) { | 112 | if (index != 0) { |
| 113 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 113 | ACPI_ERROR((AE_INFO, |
| 114 | "Could not construct pathname; index=%X, size=%X, Path=%s\n", | 114 | "Could not construct pathname; index=%X, size=%X, Path=%s", |
| 115 | (u32) index, (u32) size, &name_buffer[size])); | 115 | (u32) index, (u32) size, &name_buffer[size])); |
| 116 | } | 116 | } |
| 117 | 117 | ||
| 118 | return; | 118 | return; |
| @@ -148,7 +148,7 @@ char *acpi_ns_get_external_pathname(struct acpi_namespace_node *node) | |||
| 148 | 148 | ||
| 149 | name_buffer = ACPI_MEM_CALLOCATE(size); | 149 | name_buffer = ACPI_MEM_CALLOCATE(size); |
| 150 | if (!name_buffer) { | 150 | if (!name_buffer) { |
| 151 | ACPI_REPORT_ERROR(("ns_get_table_pathname: allocation failure\n")); | 151 | ACPI_ERROR((AE_INFO, "Allocation failure")); |
| 152 | return_PTR(NULL); | 152 | return_PTR(NULL); |
| 153 | } | 153 | } |
| 154 | 154 | ||
| @@ -241,7 +241,7 @@ acpi_ns_handle_to_pathname(acpi_handle target_handle, | |||
| 241 | 241 | ||
| 242 | acpi_ns_build_external_path(node, required_size, buffer->pointer); | 242 | acpi_ns_build_external_path(node, required_size, buffer->pointer); |
| 243 | 243 | ||
| 244 | ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "%s [%X] \n", | 244 | ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "%s [%X]\n", |
| 245 | (char *)buffer->pointer, (u32) required_size)); | 245 | (char *)buffer->pointer, (u32) required_size)); |
| 246 | return_ACPI_STATUS(AE_OK); | 246 | return_ACPI_STATUS(AE_OK); |
| 247 | } | 247 | } |
diff --git a/drivers/acpi/namespace/nsobject.c b/drivers/acpi/namespace/nsobject.c index fc9be946ebed..10ae6292bca4 100644 --- a/drivers/acpi/namespace/nsobject.c +++ b/drivers/acpi/namespace/nsobject.c | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | ******************************************************************************/ | 6 | ******************************************************************************/ |
| 7 | 7 | ||
| 8 | /* | 8 | /* |
| 9 | * Copyright (C) 2000 - 2005, R. Byron Moore | 9 | * Copyright (C) 2000 - 2006, R. Byron Moore |
| 10 | * All rights reserved. | 10 | * All rights reserved. |
| 11 | * | 11 | * |
| 12 | * Redistribution and use in source and binary forms, with or without | 12 | * Redistribution and use in source and binary forms, with or without |
| @@ -84,22 +84,23 @@ acpi_ns_attach_object(struct acpi_namespace_node *node, | |||
| 84 | if (!node) { | 84 | if (!node) { |
| 85 | /* Invalid handle */ | 85 | /* Invalid handle */ |
| 86 | 86 | ||
| 87 | ACPI_REPORT_ERROR(("ns_attach_object: Null named_obj handle\n")); | 87 | ACPI_ERROR((AE_INFO, "Null named_obj handle")); |
| 88 | return_ACPI_STATUS(AE_BAD_PARAMETER); | 88 | return_ACPI_STATUS(AE_BAD_PARAMETER); |
| 89 | } | 89 | } |
| 90 | 90 | ||
| 91 | if (!object && (ACPI_TYPE_ANY != type)) { | 91 | if (!object && (ACPI_TYPE_ANY != type)) { |
| 92 | /* Null object */ | 92 | /* Null object */ |
| 93 | 93 | ||
| 94 | ACPI_REPORT_ERROR(("ns_attach_object: Null object, but type not ACPI_TYPE_ANY\n")); | 94 | ACPI_ERROR((AE_INFO, |
| 95 | "Null object, but type not ACPI_TYPE_ANY")); | ||
| 95 | return_ACPI_STATUS(AE_BAD_PARAMETER); | 96 | return_ACPI_STATUS(AE_BAD_PARAMETER); |
| 96 | } | 97 | } |
| 97 | 98 | ||
| 98 | if (ACPI_GET_DESCRIPTOR_TYPE(node) != ACPI_DESC_TYPE_NAMED) { | 99 | if (ACPI_GET_DESCRIPTOR_TYPE(node) != ACPI_DESC_TYPE_NAMED) { |
| 99 | /* Not a name handle */ | 100 | /* Not a name handle */ |
| 100 | 101 | ||
| 101 | ACPI_REPORT_ERROR(("ns_attach_object: Invalid handle %p [%s]\n", | 102 | ACPI_ERROR((AE_INFO, "Invalid handle %p [%s]", |
| 102 | node, acpi_ut_get_descriptor_name(node))); | 103 | node, acpi_ut_get_descriptor_name(node))); |
| 103 | return_ACPI_STATUS(AE_BAD_PARAMETER); | 104 | return_ACPI_STATUS(AE_BAD_PARAMETER); |
| 104 | } | 105 | } |
| 105 | 106 | ||
| @@ -254,7 +255,7 @@ union acpi_operand_object *acpi_ns_get_attached_object(struct | |||
| 254 | ACPI_FUNCTION_TRACE_PTR("ns_get_attached_object", node); | 255 | ACPI_FUNCTION_TRACE_PTR("ns_get_attached_object", node); |
| 255 | 256 | ||
| 256 | if (!node) { | 257 | if (!node) { |
| 257 | ACPI_DEBUG_PRINT((ACPI_DB_WARN, "Null Node ptr\n")); | 258 | ACPI_WARNING((AE_INFO, "Null Node ptr")); |
| 258 | return_PTR(NULL); | 259 | return_PTR(NULL); |
| 259 | } | 260 | } |
| 260 | 261 | ||
diff --git a/drivers/acpi/namespace/nsparse.c b/drivers/acpi/namespace/nsparse.c index 433442a9ec74..232be4303653 100644 --- a/drivers/acpi/namespace/nsparse.c +++ b/drivers/acpi/namespace/nsparse.c | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
| 6 | 6 | ||
| 7 | /* | 7 | /* |
| 8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
| 9 | * All rights reserved. | 9 | * All rights reserved. |
| 10 | * | 10 | * |
| 11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
diff --git a/drivers/acpi/namespace/nssearch.c b/drivers/acpi/namespace/nssearch.c index 50a3ca5470ed..d64b78952f24 100644 --- a/drivers/acpi/namespace/nssearch.c +++ b/drivers/acpi/namespace/nssearch.c | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | ******************************************************************************/ | 5 | ******************************************************************************/ |
| 6 | 6 | ||
| 7 | /* | 7 | /* |
| 8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
| 9 | * All rights reserved. | 9 | * All rights reserved. |
| 10 | * | 10 | * |
| 11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
| @@ -99,8 +99,8 @@ acpi_ns_search_node(u32 target_name, | |||
| 99 | if (scope_name) { | 99 | if (scope_name) { |
| 100 | ACPI_DEBUG_PRINT((ACPI_DB_NAMES, | 100 | ACPI_DEBUG_PRINT((ACPI_DB_NAMES, |
| 101 | "Searching %s (%p) For [%4.4s] (%s)\n", | 101 | "Searching %s (%p) For [%4.4s] (%s)\n", |
| 102 | scope_name, node, | 102 | scope_name, node, ACPI_CAST_PTR(char, |
| 103 | (char *)&target_name, | 103 | &target_name), |
| 104 | acpi_ut_get_type_name(type))); | 104 | acpi_ut_get_type_name(type))); |
| 105 | 105 | ||
| 106 | ACPI_MEM_FREE(scope_name); | 106 | ACPI_MEM_FREE(scope_name); |
| @@ -131,7 +131,7 @@ acpi_ns_search_node(u32 target_name, | |||
| 131 | */ | 131 | */ |
| 132 | ACPI_DEBUG_PRINT((ACPI_DB_NAMES, | 132 | ACPI_DEBUG_PRINT((ACPI_DB_NAMES, |
| 133 | "Name [%4.4s] (%s) %p found in scope [%4.4s] %p\n", | 133 | "Name [%4.4s] (%s) %p found in scope [%4.4s] %p\n", |
| 134 | (char *)&target_name, | 134 | ACPI_CAST_PTR(char, &target_name), |
| 135 | acpi_ut_get_type_name(next_node-> | 135 | acpi_ut_get_type_name(next_node-> |
| 136 | type), | 136 | type), |
| 137 | next_node, | 137 | next_node, |
| @@ -160,7 +160,8 @@ acpi_ns_search_node(u32 target_name, | |||
| 160 | 160 | ||
| 161 | ACPI_DEBUG_PRINT((ACPI_DB_NAMES, | 161 | ACPI_DEBUG_PRINT((ACPI_DB_NAMES, |
| 162 | "Name [%4.4s] (%s) not found in search in scope [%4.4s] %p first child %p\n", | 162 | "Name [%4.4s] (%s) not found in search in scope [%4.4s] %p first child %p\n", |
| 163 | (char *)&target_name, acpi_ut_get_type_name(type), | 163 | ACPI_CAST_PTR(char, &target_name), |
| 164 | acpi_ut_get_type_name(type), | ||
| 164 | acpi_ut_get_node_name(node), node, node->child)); | 165 | acpi_ut_get_node_name(node), node, node->child)); |
| 165 | 166 | ||
| 166 | return_ACPI_STATUS(AE_NOT_FOUND); | 167 | return_ACPI_STATUS(AE_NOT_FOUND); |
| @@ -210,14 +211,14 @@ acpi_ns_search_parent_tree(u32 target_name, | |||
| 210 | */ | 211 | */ |
| 211 | if (!parent_node) { | 212 | if (!parent_node) { |
| 212 | ACPI_DEBUG_PRINT((ACPI_DB_NAMES, "[%4.4s] has no parent\n", | 213 | ACPI_DEBUG_PRINT((ACPI_DB_NAMES, "[%4.4s] has no parent\n", |
| 213 | (char *)&target_name)); | 214 | ACPI_CAST_PTR(char, &target_name))); |
| 214 | return_ACPI_STATUS(AE_NOT_FOUND); | 215 | return_ACPI_STATUS(AE_NOT_FOUND); |
| 215 | } | 216 | } |
| 216 | 217 | ||
| 217 | if (acpi_ns_local(type)) { | 218 | if (acpi_ns_local(type)) { |
| 218 | ACPI_DEBUG_PRINT((ACPI_DB_NAMES, | 219 | ACPI_DEBUG_PRINT((ACPI_DB_NAMES, |
| 219 | "[%4.4s] type [%s] must be local to this scope (no parent search)\n", | 220 | "[%4.4s] type [%s] must be local to this scope (no parent search)\n", |
| 220 | (char *)&target_name, | 221 | ACPI_CAST_PTR(char, &target_name), |
| 221 | acpi_ut_get_type_name(type))); | 222 | acpi_ut_get_type_name(type))); |
| 222 | return_ACPI_STATUS(AE_NOT_FOUND); | 223 | return_ACPI_STATUS(AE_NOT_FOUND); |
| 223 | } | 224 | } |
| @@ -227,7 +228,7 @@ acpi_ns_search_parent_tree(u32 target_name, | |||
| 227 | ACPI_DEBUG_PRINT((ACPI_DB_NAMES, | 228 | ACPI_DEBUG_PRINT((ACPI_DB_NAMES, |
| 228 | "Searching parent [%4.4s] for [%4.4s]\n", | 229 | "Searching parent [%4.4s] for [%4.4s]\n", |
| 229 | acpi_ut_get_node_name(parent_node), | 230 | acpi_ut_get_node_name(parent_node), |
| 230 | (char *)&target_name)); | 231 | ACPI_CAST_PTR(char, &target_name))); |
| 231 | 232 | ||
| 232 | /* | 233 | /* |
| 233 | * Search parents until target is found or we have backed up to the root | 234 | * Search parents until target is found or we have backed up to the root |
| @@ -297,18 +298,17 @@ acpi_ns_search_and_enter(u32 target_name, | |||
| 297 | /* Parameter validation */ | 298 | /* Parameter validation */ |
| 298 | 299 | ||
| 299 | if (!node || !target_name || !return_node) { | 300 | if (!node || !target_name || !return_node) { |
| 300 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 301 | ACPI_ERROR((AE_INFO, |
| 301 | "Null param: Node %p Name %X return_node %p\n", | 302 | "Null param: Node %p Name %X return_node %p", |
| 302 | node, target_name, return_node)); | 303 | node, target_name, return_node)); |
| 303 | |||
| 304 | ACPI_REPORT_ERROR(("ns_search_and_enter: Null parameter\n")); | ||
| 305 | return_ACPI_STATUS(AE_BAD_PARAMETER); | 304 | return_ACPI_STATUS(AE_BAD_PARAMETER); |
| 306 | } | 305 | } |
| 307 | 306 | ||
| 308 | /* Name must consist of printable characters */ | 307 | /* Name must consist of printable characters */ |
| 309 | 308 | ||
| 310 | if (!acpi_ut_valid_acpi_name(target_name)) { | 309 | if (!acpi_ut_valid_acpi_name(target_name)) { |
| 311 | ACPI_REPORT_ERROR(("ns_search_and_enter: Bad character in ACPI Name: %X\n", target_name)); | 310 | ACPI_ERROR((AE_INFO, "Bad character in ACPI Name: %X", |
| 311 | target_name)); | ||
| 312 | return_ACPI_STATUS(AE_BAD_CHARACTER); | 312 | return_ACPI_STATUS(AE_BAD_CHARACTER); |
| 313 | } | 313 | } |
| 314 | 314 | ||
| @@ -360,7 +360,7 @@ acpi_ns_search_and_enter(u32 target_name, | |||
| 360 | if (interpreter_mode == ACPI_IMODE_EXECUTE) { | 360 | if (interpreter_mode == ACPI_IMODE_EXECUTE) { |
| 361 | ACPI_DEBUG_PRINT((ACPI_DB_NAMES, | 361 | ACPI_DEBUG_PRINT((ACPI_DB_NAMES, |
| 362 | "%4.4s Not found in %p [Not adding]\n", | 362 | "%4.4s Not found in %p [Not adding]\n", |
| 363 | (char *)&target_name, node)); | 363 | ACPI_CAST_PTR(char, &target_name), node)); |
| 364 | 364 | ||
| 365 | return_ACPI_STATUS(AE_NOT_FOUND); | 365 | return_ACPI_STATUS(AE_NOT_FOUND); |
| 366 | } | 366 | } |
diff --git a/drivers/acpi/namespace/nsutils.c b/drivers/acpi/namespace/nsutils.c index ebec036423c9..3e7cad549a38 100644 --- a/drivers/acpi/namespace/nsutils.c +++ b/drivers/acpi/namespace/nsutils.c | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | *****************************************************************************/ | 6 | *****************************************************************************/ |
| 7 | 7 | ||
| 8 | /* | 8 | /* |
| 9 | * Copyright (C) 2000 - 2005, R. Byron Moore | 9 | * Copyright (C) 2000 - 2006, R. Byron Moore |
| 10 | * All rights reserved. | 10 | * All rights reserved. |
| 11 | * | 11 | * |
| 12 | * Redistribution and use in source and binary forms, with or without | 12 | * Redistribution and use in source and binary forms, with or without |
| @@ -63,7 +63,6 @@ acpi_name acpi_ns_find_parent_name(struct acpi_namespace_node *node_to_search); | |||
| 63 | * | 63 | * |
| 64 | * PARAMETERS: module_name - Caller's module name (for error output) | 64 | * PARAMETERS: module_name - Caller's module name (for error output) |
| 65 | * line_number - Caller's line number (for error output) | 65 | * line_number - Caller's line number (for error output) |
| 66 | * component_id - Caller's component ID (for error output) | ||
| 67 | * internal_name - Name or path of the namespace node | 66 | * internal_name - Name or path of the namespace node |
| 68 | * lookup_status - Exception code from NS lookup | 67 | * lookup_status - Exception code from NS lookup |
| 69 | * | 68 | * |
| @@ -76,19 +75,17 @@ acpi_name acpi_ns_find_parent_name(struct acpi_namespace_node *node_to_search); | |||
| 76 | void | 75 | void |
| 77 | acpi_ns_report_error(char *module_name, | 76 | acpi_ns_report_error(char *module_name, |
| 78 | u32 line_number, | 77 | u32 line_number, |
| 79 | u32 component_id, | ||
| 80 | char *internal_name, acpi_status lookup_status) | 78 | char *internal_name, acpi_status lookup_status) |
| 81 | { | 79 | { |
| 82 | acpi_status status; | 80 | acpi_status status; |
| 83 | char *name = NULL; | 81 | char *name = NULL; |
| 84 | 82 | ||
| 85 | acpi_os_printf("%8s-%04d: *** Error: Looking up ", | 83 | acpi_ut_report_error(module_name, line_number); |
| 86 | module_name, line_number); | ||
| 87 | 84 | ||
| 88 | if (lookup_status == AE_BAD_CHARACTER) { | 85 | if (lookup_status == AE_BAD_CHARACTER) { |
| 89 | /* There is a non-ascii character in the name */ | 86 | /* There is a non-ascii character in the name */ |
| 90 | 87 | ||
| 91 | acpi_os_printf("[0x%4.4X] (NON-ASCII)\n", | 88 | acpi_os_printf("[0x%4.4X] (NON-ASCII)", |
| 92 | *(ACPI_CAST_PTR(u32, internal_name))); | 89 | *(ACPI_CAST_PTR(u32, internal_name))); |
| 93 | } else { | 90 | } else { |
| 94 | /* Convert path to external format */ | 91 | /* Convert path to external format */ |
| @@ -109,7 +106,7 @@ acpi_ns_report_error(char *module_name, | |||
| 109 | } | 106 | } |
| 110 | } | 107 | } |
| 111 | 108 | ||
| 112 | acpi_os_printf(" in namespace, %s\n", | 109 | acpi_os_printf(" Namespace lookup failure, %s\n", |
| 113 | acpi_format_exception(lookup_status)); | 110 | acpi_format_exception(lookup_status)); |
| 114 | } | 111 | } |
| 115 | 112 | ||
| @@ -119,10 +116,9 @@ acpi_ns_report_error(char *module_name, | |||
| 119 | * | 116 | * |
| 120 | * PARAMETERS: module_name - Caller's module name (for error output) | 117 | * PARAMETERS: module_name - Caller's module name (for error output) |
| 121 | * line_number - Caller's line number (for error output) | 118 | * line_number - Caller's line number (for error output) |
| 122 | * component_id - Caller's component ID (for error output) | ||
| 123 | * Message - Error message to use on failure | 119 | * Message - Error message to use on failure |
| 124 | * prefix_node - Prefix relative to the path | 120 | * prefix_node - Prefix relative to the path |
| 125 | * Path - Path to the node | 121 | * Path - Path to the node (optional) |
| 126 | * method_status - Execution status | 122 | * method_status - Execution status |
| 127 | * | 123 | * |
| 128 | * RETURN: None | 124 | * RETURN: None |
| @@ -134,7 +130,6 @@ acpi_ns_report_error(char *module_name, | |||
| 134 | void | 130 | void |
| 135 | acpi_ns_report_method_error(char *module_name, | 131 | acpi_ns_report_method_error(char *module_name, |
| 136 | u32 line_number, | 132 | u32 line_number, |
| 137 | u32 component_id, | ||
| 138 | char *message, | 133 | char *message, |
| 139 | struct acpi_namespace_node *prefix_node, | 134 | struct acpi_namespace_node *prefix_node, |
| 140 | char *path, acpi_status method_status) | 135 | char *path, acpi_status method_status) |
| @@ -142,17 +137,16 @@ acpi_ns_report_method_error(char *module_name, | |||
| 142 | acpi_status status; | 137 | acpi_status status; |
| 143 | struct acpi_namespace_node *node = prefix_node; | 138 | struct acpi_namespace_node *node = prefix_node; |
| 144 | 139 | ||
| 140 | acpi_ut_report_error(module_name, line_number); | ||
| 141 | |||
| 145 | if (path) { | 142 | if (path) { |
| 146 | status = acpi_ns_get_node_by_path(path, prefix_node, | 143 | status = acpi_ns_get_node_by_path(path, prefix_node, |
| 147 | ACPI_NS_NO_UPSEARCH, &node); | 144 | ACPI_NS_NO_UPSEARCH, &node); |
| 148 | if (ACPI_FAILURE(status)) { | 145 | if (ACPI_FAILURE(status)) { |
| 149 | acpi_os_printf | 146 | acpi_os_printf("[Could not get node by pathname]"); |
| 150 | ("report_method_error: Could not get node\n"); | ||
| 151 | return; | ||
| 152 | } | 147 | } |
| 153 | } | 148 | } |
| 154 | 149 | ||
| 155 | acpi_os_printf("%8s-%04d: *** Error: ", module_name, line_number); | ||
| 156 | acpi_ns_print_node_pathname(node, message); | 150 | acpi_ns_print_node_pathname(node, message); |
| 157 | acpi_os_printf(", %s\n", acpi_format_exception(method_status)); | 151 | acpi_os_printf(", %s\n", acpi_format_exception(method_status)); |
| 158 | } | 152 | } |
| @@ -248,11 +242,11 @@ acpi_object_type acpi_ns_get_type(struct acpi_namespace_node * node) | |||
| 248 | ACPI_FUNCTION_TRACE("ns_get_type"); | 242 | ACPI_FUNCTION_TRACE("ns_get_type"); |
| 249 | 243 | ||
| 250 | if (!node) { | 244 | if (!node) { |
| 251 | ACPI_REPORT_WARNING(("ns_get_type: Null Node input pointer\n")); | 245 | ACPI_WARNING((AE_INFO, "Null Node parameter")); |
| 252 | return_VALUE(ACPI_TYPE_ANY); | 246 | return_UINT32(ACPI_TYPE_ANY); |
| 253 | } | 247 | } |
| 254 | 248 | ||
| 255 | return_VALUE((acpi_object_type) node->type); | 249 | return_UINT32((acpi_object_type) node->type); |
| 256 | } | 250 | } |
| 257 | 251 | ||
| 258 | /******************************************************************************* | 252 | /******************************************************************************* |
| @@ -275,11 +269,11 @@ u32 acpi_ns_local(acpi_object_type type) | |||
| 275 | if (!acpi_ut_valid_object_type(type)) { | 269 | if (!acpi_ut_valid_object_type(type)) { |
| 276 | /* Type code out of range */ | 270 | /* Type code out of range */ |
| 277 | 271 | ||
| 278 | ACPI_REPORT_WARNING(("ns_local: Invalid Object Type\n")); | 272 | ACPI_WARNING((AE_INFO, "Invalid Object Type %X", type)); |
| 279 | return_VALUE(ACPI_NS_NORMAL); | 273 | return_UINT32(ACPI_NS_NORMAL); |
| 280 | } | 274 | } |
| 281 | 275 | ||
| 282 | return_VALUE((u32) acpi_gbl_ns_properties[type] & ACPI_NS_LOCAL); | 276 | return_UINT32((u32) acpi_gbl_ns_properties[type] & ACPI_NS_LOCAL); |
| 283 | } | 277 | } |
| 284 | 278 | ||
| 285 | /******************************************************************************* | 279 | /******************************************************************************* |
| @@ -627,7 +621,7 @@ acpi_ns_externalize_name(u32 internal_name_length, | |||
| 627 | * with internal_name (invalid format). | 621 | * with internal_name (invalid format). |
| 628 | */ | 622 | */ |
| 629 | if (required_length > internal_name_length) { | 623 | if (required_length > internal_name_length) { |
| 630 | ACPI_REPORT_ERROR(("ns_externalize_name: Invalid internal name\n")); | 624 | ACPI_ERROR((AE_INFO, "Invalid internal name")); |
| 631 | return_ACPI_STATUS(AE_BAD_PATHNAME); | 625 | return_ACPI_STATUS(AE_BAD_PATHNAME); |
| 632 | } | 626 | } |
| 633 | 627 | ||
| @@ -803,12 +797,11 @@ u32 acpi_ns_opens_scope(acpi_object_type type) | |||
| 803 | if (!acpi_ut_valid_object_type(type)) { | 797 | if (!acpi_ut_valid_object_type(type)) { |
| 804 | /* type code out of range */ | 798 | /* type code out of range */ |
| 805 | 799 | ||
| 806 | ACPI_REPORT_WARNING(("ns_opens_scope: Invalid Object Type %X\n", | 800 | ACPI_WARNING((AE_INFO, "Invalid Object Type %X", type)); |
| 807 | type)); | 801 | return_UINT32(ACPI_NS_NORMAL); |
| 808 | return_VALUE(ACPI_NS_NORMAL); | ||
| 809 | } | 802 | } |
| 810 | 803 | ||
| 811 | return_VALUE(((u32) acpi_gbl_ns_properties[type]) & ACPI_NS_NEWSCOPE); | 804 | return_UINT32(((u32) acpi_gbl_ns_properties[type]) & ACPI_NS_NEWSCOPE); |
| 812 | } | 805 | } |
| 813 | 806 | ||
| 814 | /******************************************************************************* | 807 | /******************************************************************************* |
diff --git a/drivers/acpi/namespace/nswalk.c b/drivers/acpi/namespace/nswalk.c index 5f164c0df33b..fcab1e784b81 100644 --- a/drivers/acpi/namespace/nswalk.c +++ b/drivers/acpi/namespace/nswalk.c | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
| 6 | 6 | ||
| 7 | /* | 7 | /* |
| 8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
| 9 | * All rights reserved. | 9 | * All rights reserved. |
| 10 | * | 10 | * |
| 11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
diff --git a/drivers/acpi/namespace/nsxfeval.c b/drivers/acpi/namespace/nsxfeval.c index c07b046659ff..a95f636dc35d 100644 --- a/drivers/acpi/namespace/nsxfeval.c +++ b/drivers/acpi/namespace/nsxfeval.c | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | ******************************************************************************/ | 6 | ******************************************************************************/ |
| 7 | 7 | ||
| 8 | /* | 8 | /* |
| 9 | * Copyright (C) 2000 - 2005, R. Byron Moore | 9 | * Copyright (C) 2000 - 2006, R. Byron Moore |
| 10 | * All rights reserved. | 10 | * All rights reserved. |
| 11 | * | 11 | * |
| 12 | * Redistribution and use in source and binary forms, with or without | 12 | * Redistribution and use in source and binary forms, with or without |
| @@ -112,8 +112,7 @@ acpi_evaluate_object_typed(acpi_handle handle, | |||
| 112 | if (return_buffer->length == 0) { | 112 | if (return_buffer->length == 0) { |
| 113 | /* Error because caller specifically asked for a return value */ | 113 | /* Error because caller specifically asked for a return value */ |
| 114 | 114 | ||
| 115 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "No return value\n")); | 115 | ACPI_ERROR((AE_INFO, "No return value")); |
| 116 | |||
| 117 | return_ACPI_STATUS(AE_NULL_OBJECT); | 116 | return_ACPI_STATUS(AE_NULL_OBJECT); |
| 118 | } | 117 | } |
| 119 | 118 | ||
| @@ -125,11 +124,11 @@ acpi_evaluate_object_typed(acpi_handle handle, | |||
| 125 | 124 | ||
| 126 | /* Return object type does not match requested type */ | 125 | /* Return object type does not match requested type */ |
| 127 | 126 | ||
| 128 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 127 | ACPI_ERROR((AE_INFO, |
| 129 | "Incorrect return type [%s] requested [%s]\n", | 128 | "Incorrect return type [%s] requested [%s]", |
| 130 | acpi_ut_get_type_name(((union acpi_object *) | 129 | acpi_ut_get_type_name(((union acpi_object *)return_buffer-> |
| 131 | return_buffer->pointer)->type), | 130 | pointer)->type), |
| 132 | acpi_ut_get_type_name(return_type))); | 131 | acpi_ut_get_type_name(return_type))); |
| 133 | 132 | ||
| 134 | if (must_free) { | 133 | if (must_free) { |
| 135 | /* Caller used ACPI_ALLOCATE_BUFFER, free the return buffer */ | 134 | /* Caller used ACPI_ALLOCATE_BUFFER, free the return buffer */ |
| @@ -236,11 +235,11 @@ acpi_evaluate_object(acpi_handle handle, | |||
| 236 | * qualified names above, this is an error | 235 | * qualified names above, this is an error |
| 237 | */ | 236 | */ |
| 238 | if (!pathname) { | 237 | if (!pathname) { |
| 239 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 238 | ACPI_ERROR((AE_INFO, |
| 240 | "Both Handle and Pathname are NULL\n")); | 239 | "Both Handle and Pathname are NULL")); |
| 241 | } else { | 240 | } else { |
| 242 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 241 | ACPI_ERROR((AE_INFO, |
| 243 | "Handle is NULL and Pathname is relative\n")); | 242 | "Handle is NULL and Pathname is relative")); |
| 244 | } | 243 | } |
| 245 | 244 | ||
| 246 | status = AE_BAD_PARAMETER; | 245 | status = AE_BAD_PARAMETER; |
| @@ -399,7 +398,7 @@ acpi_walk_namespace(acpi_object_type type, | |||
| 399 | 398 | ||
| 400 | /* Parameter validation */ | 399 | /* Parameter validation */ |
| 401 | 400 | ||
| 402 | if ((type > ACPI_TYPE_EXTERNAL_MAX) || (!max_depth) || (!user_function)) { | 401 | if ((type > ACPI_TYPE_LOCAL_MAX) || (!max_depth) || (!user_function)) { |
| 403 | return_ACPI_STATUS(AE_BAD_PARAMETER); | 402 | return_ACPI_STATUS(AE_BAD_PARAMETER); |
| 404 | } | 403 | } |
| 405 | 404 | ||
| @@ -473,8 +472,8 @@ acpi_ns_get_device_callback(acpi_handle obj_handle, | |||
| 473 | return (AE_CTRL_DEPTH); | 472 | return (AE_CTRL_DEPTH); |
| 474 | } | 473 | } |
| 475 | 474 | ||
| 476 | if (!(flags & 0x01)) { | 475 | if (!(flags & ACPI_STA_DEVICE_PRESENT)) { |
| 477 | /* Don't return at the device or children of the device if not there */ | 476 | /* Don't examine children of the device if not present */ |
| 478 | 477 | ||
| 479 | return (AE_CTRL_DEPTH); | 478 | return (AE_CTRL_DEPTH); |
| 480 | } | 479 | } |
diff --git a/drivers/acpi/namespace/nsxfname.c b/drivers/acpi/namespace/nsxfname.c index 6b5f8d4481d1..8cd8675a47c0 100644 --- a/drivers/acpi/namespace/nsxfname.c +++ b/drivers/acpi/namespace/nsxfname.c | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | *****************************************************************************/ | 6 | *****************************************************************************/ |
| 7 | 7 | ||
| 8 | /* | 8 | /* |
| 9 | * Copyright (C) 2000 - 2005, R. Byron Moore | 9 | * Copyright (C) 2000 - 2006, R. Byron Moore |
| 10 | * All rights reserved. | 10 | * All rights reserved. |
| 11 | * | 11 | * |
| 12 | * Redistribution and use in source and binary forms, with or without | 12 | * Redistribution and use in source and binary forms, with or without |
| @@ -300,8 +300,7 @@ acpi_get_object_info(acpi_handle handle, struct acpi_buffer * buffer) | |||
| 300 | 300 | ||
| 301 | status = acpi_ut_execute_CID(node, &cid_list); | 301 | status = acpi_ut_execute_CID(node, &cid_list); |
| 302 | if (ACPI_SUCCESS(status)) { | 302 | if (ACPI_SUCCESS(status)) { |
| 303 | size += ((acpi_size) cid_list->count - 1) * | 303 | size += cid_list->size; |
| 304 | sizeof(struct acpi_compatible_id); | ||
| 305 | info->valid |= ACPI_VALID_CID; | 304 | info->valid |= ACPI_VALID_CID; |
| 306 | } | 305 | } |
| 307 | 306 | ||
diff --git a/drivers/acpi/namespace/nsxfobj.c b/drivers/acpi/namespace/nsxfobj.c index 0856d42e6909..a0332595677a 100644 --- a/drivers/acpi/namespace/nsxfobj.c +++ b/drivers/acpi/namespace/nsxfobj.c | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | ******************************************************************************/ | 6 | ******************************************************************************/ |
| 7 | 7 | ||
| 8 | /* | 8 | /* |
| 9 | * Copyright (C) 2000 - 2005, R. Byron Moore | 9 | * Copyright (C) 2000 - 2006, R. Byron Moore |
| 10 | * All rights reserved. | 10 | * All rights reserved. |
| 11 | * | 11 | * |
| 12 | * Redistribution and use in source and binary forms, with or without | 12 | * Redistribution and use in source and binary forms, with or without |
