diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-23 13:20:36 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-23 13:20:36 -0400 |
| commit | 765426e8ee4c0ab2bc9d44951f4865b8494cdbd0 (patch) | |
| tree | 2b46ab8953eff175c8d3474a9754c1ab1394e4de /drivers/acpi/utilities/utglobal.c | |
| parent | 36ec891895020f3bc9953c8b11d079c6d77d76bd (diff) | |
| parent | 898b054f3eec5921320ae8614b5bdd7b07ea5b43 (diff) | |
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (123 commits)
dock: make dock driver not a module
ACPI: fix ia64 build warning
ACPI: hack around sysfs warning with link order
ACPI suspend: fix build warning when CONFIG_ACPI_SLEEP=n
intel_menlo: fix build warning
panasonic-laptop: fix build
ACPICA: Update version to 20080926
ACPICA: Add support for zero-length buffer-to-string conversions
ACPICA: New: Validation for predefined ACPI methods/objects
ACPICA: Fix for implicit return compatibility
ACPICA: Fixed a couple memory leaks associated with "implicit return"
ACPICA: Optimize buffer allocation procedure
ACPICA: Fix possible memory leak, error exit path
ACPICA: Fix fault after mem allocation failure in AML parser
ACPICA: Remove unused ACPI register bit definition
ACPICA: Update version to 20080829
ACPICA: Fix possible memory leak in acpi_ns_get_external_pathname
ACPICA: Cleanup for internal Reference Object
ACPICA: Update comments - no functional changes
ACPICA: Update for Reference ACPI_OPERAND_OBJECT
...
Diffstat (limited to 'drivers/acpi/utilities/utglobal.c')
| -rw-r--r-- | drivers/acpi/utilities/utglobal.c | 52 |
1 files changed, 46 insertions, 6 deletions
diff --git a/drivers/acpi/utilities/utglobal.c b/drivers/acpi/utilities/utglobal.c index a6e71b801d2..670551b95e5 100644 --- a/drivers/acpi/utilities/utglobal.c +++ b/drivers/acpi/utilities/utglobal.c | |||
| @@ -281,7 +281,6 @@ struct acpi_bit_register_info acpi_gbl_bit_register_info[ACPI_NUM_BITREG] = { | |||
| 281 | /* ACPI_BITREG_RT_CLOCK_ENABLE */ {ACPI_REGISTER_PM1_ENABLE, | 281 | /* ACPI_BITREG_RT_CLOCK_ENABLE */ {ACPI_REGISTER_PM1_ENABLE, |
| 282 | ACPI_BITPOSITION_RT_CLOCK_ENABLE, | 282 | ACPI_BITPOSITION_RT_CLOCK_ENABLE, |
| 283 | ACPI_BITMASK_RT_CLOCK_ENABLE}, | 283 | ACPI_BITMASK_RT_CLOCK_ENABLE}, |
| 284 | /* ACPI_BITREG_WAKE_ENABLE */ {ACPI_REGISTER_PM1_ENABLE, 0, 0}, | ||
| 285 | /* ACPI_BITREG_PCIEXP_WAKE_DISABLE */ {ACPI_REGISTER_PM1_ENABLE, | 284 | /* ACPI_BITREG_PCIEXP_WAKE_DISABLE */ {ACPI_REGISTER_PM1_ENABLE, |
| 286 | ACPI_BITPOSITION_PCIEXP_WAKE_DISABLE, | 285 | ACPI_BITPOSITION_PCIEXP_WAKE_DISABLE, |
| 287 | ACPI_BITMASK_PCIEXP_WAKE_DISABLE}, | 286 | ACPI_BITMASK_PCIEXP_WAKE_DISABLE}, |
| @@ -575,6 +574,47 @@ char *acpi_ut_get_descriptor_name(void *object) | |||
| 575 | 574 | ||
| 576 | } | 575 | } |
| 577 | 576 | ||
| 577 | /******************************************************************************* | ||
| 578 | * | ||
| 579 | * FUNCTION: acpi_ut_get_reference_name | ||
| 580 | * | ||
| 581 | * PARAMETERS: Object - An ACPI reference object | ||
| 582 | * | ||
| 583 | * RETURN: Pointer to a string | ||
| 584 | * | ||
| 585 | * DESCRIPTION: Decode a reference object sub-type to a string. | ||
| 586 | * | ||
| 587 | ******************************************************************************/ | ||
| 588 | |||
| 589 | /* Printable names of reference object sub-types */ | ||
| 590 | |||
| 591 | static const char *acpi_gbl_ref_class_names[] = { | ||
| 592 | /* 00 */ "Local", | ||
| 593 | /* 01 */ "Argument", | ||
| 594 | /* 02 */ "RefOf", | ||
| 595 | /* 03 */ "Index", | ||
| 596 | /* 04 */ "DdbHandle", | ||
| 597 | /* 05 */ "Named Object", | ||
| 598 | /* 06 */ "Debug" | ||
| 599 | }; | ||
| 600 | |||
| 601 | const char *acpi_ut_get_reference_name(union acpi_operand_object *object) | ||
| 602 | { | ||
| 603 | if (!object) | ||
| 604 | return "NULL Object"; | ||
| 605 | |||
| 606 | if (ACPI_GET_DESCRIPTOR_TYPE(object) != ACPI_DESC_TYPE_OPERAND) | ||
| 607 | return "Not an Operand object"; | ||
| 608 | |||
| 609 | if (object->common.type != ACPI_TYPE_LOCAL_REFERENCE) | ||
| 610 | return "Not a Reference object"; | ||
| 611 | |||
| 612 | if (object->reference.class > ACPI_REFCLASS_MAX) | ||
| 613 | return "Unknown Reference class"; | ||
| 614 | |||
| 615 | return acpi_gbl_ref_class_names[object->reference.class]; | ||
| 616 | } | ||
| 617 | |||
| 578 | #if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER) | 618 | #if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER) |
| 579 | /* | 619 | /* |
| 580 | * Strings and procedures used for debug only | 620 | * Strings and procedures used for debug only |
| @@ -677,14 +717,14 @@ u8 acpi_ut_valid_object_type(acpi_object_type type) | |||
| 677 | * | 717 | * |
| 678 | * PARAMETERS: None | 718 | * PARAMETERS: None |
| 679 | * | 719 | * |
| 680 | * RETURN: None | 720 | * RETURN: Status |
| 681 | * | 721 | * |
| 682 | * DESCRIPTION: Init library globals. All globals that require specific | 722 | * DESCRIPTION: Init library globals. All globals that require specific |
| 683 | * initialization should be initialized here! | 723 | * initialization should be initialized here! |
| 684 | * | 724 | * |
| 685 | ******************************************************************************/ | 725 | ******************************************************************************/ |
| 686 | 726 | ||
| 687 | void acpi_ut_init_globals(void) | 727 | acpi_status acpi_ut_init_globals(void) |
| 688 | { | 728 | { |
| 689 | acpi_status status; | 729 | acpi_status status; |
| 690 | u32 i; | 730 | u32 i; |
| @@ -695,7 +735,7 @@ void acpi_ut_init_globals(void) | |||
| 695 | 735 | ||
| 696 | status = acpi_ut_create_caches(); | 736 | status = acpi_ut_create_caches(); |
| 697 | if (ACPI_FAILURE(status)) { | 737 | if (ACPI_FAILURE(status)) { |
| 698 | return; | 738 | return_ACPI_STATUS(status); |
| 699 | } | 739 | } |
| 700 | 740 | ||
| 701 | /* Mutex locked flags */ | 741 | /* Mutex locked flags */ |
| @@ -772,8 +812,8 @@ void acpi_ut_init_globals(void) | |||
| 772 | acpi_gbl_display_final_mem_stats = FALSE; | 812 | acpi_gbl_display_final_mem_stats = FALSE; |
| 773 | #endif | 813 | #endif |
| 774 | 814 | ||
| 775 | return_VOID; | 815 | return_ACPI_STATUS(AE_OK); |
| 776 | } | 816 | } |
| 777 | 817 | ||
| 778 | ACPI_EXPORT_SYMBOL(acpi_dbg_level) | 818 | ACPI_EXPORT_SYMBOL(acpi_dbg_level) |
| 779 | ACPI_EXPORT_SYMBOL(acpi_dbg_layer) | 819 | ACPI_EXPORT_SYMBOL(acpi_dbg_layer) |
