diff options
author | Yi Yang <yi.y.yang@intel.com> | 2008-08-03 22:30:09 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2008-10-22 23:14:36 -0400 |
commit | b417d40b9a850f12f69aa9d785d2af39c9463bb8 (patch) | |
tree | 49ab4e4732922c593b416c3cf8deecdbb57c95c2 | |
parent | a6f30539f31a8129288b0e5640d3eb1174848c15 (diff) |
ACPICA: Return status from global init function
Return status from acpi_ut_init_globals. This is used by both
the kernel subsystem and the utilities such as iASL compiler.
The function could possibly fail when the caches are initialized.
Yang Yi.
Signed-off-by: Yi Yang <yi.y.yang@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
-rw-r--r-- | drivers/acpi/utilities/utglobal.c | 8 | ||||
-rw-r--r-- | drivers/acpi/utilities/utxface.c | 7 | ||||
-rw-r--r-- | include/acpi/acutils.h | 2 |
3 files changed, 11 insertions, 6 deletions
diff --git a/drivers/acpi/utilities/utglobal.c b/drivers/acpi/utilities/utglobal.c index a6e71b801d2d..248eefc369f8 100644 --- a/drivers/acpi/utilities/utglobal.c +++ b/drivers/acpi/utilities/utglobal.c | |||
@@ -677,14 +677,14 @@ u8 acpi_ut_valid_object_type(acpi_object_type type) | |||
677 | * | 677 | * |
678 | * PARAMETERS: None | 678 | * PARAMETERS: None |
679 | * | 679 | * |
680 | * RETURN: None | 680 | * RETURN: Status |
681 | * | 681 | * |
682 | * DESCRIPTION: Init library globals. All globals that require specific | 682 | * DESCRIPTION: Init library globals. All globals that require specific |
683 | * initialization should be initialized here! | 683 | * initialization should be initialized here! |
684 | * | 684 | * |
685 | ******************************************************************************/ | 685 | ******************************************************************************/ |
686 | 686 | ||
687 | void acpi_ut_init_globals(void) | 687 | acpi_status acpi_ut_init_globals(void) |
688 | { | 688 | { |
689 | acpi_status status; | 689 | acpi_status status; |
690 | u32 i; | 690 | u32 i; |
@@ -695,7 +695,7 @@ void acpi_ut_init_globals(void) | |||
695 | 695 | ||
696 | status = acpi_ut_create_caches(); | 696 | status = acpi_ut_create_caches(); |
697 | if (ACPI_FAILURE(status)) { | 697 | if (ACPI_FAILURE(status)) { |
698 | return; | 698 | return_ACPI_STATUS(status); |
699 | } | 699 | } |
700 | 700 | ||
701 | /* Mutex locked flags */ | 701 | /* Mutex locked flags */ |
@@ -772,7 +772,7 @@ void acpi_ut_init_globals(void) | |||
772 | acpi_gbl_display_final_mem_stats = FALSE; | 772 | acpi_gbl_display_final_mem_stats = FALSE; |
773 | #endif | 773 | #endif |
774 | 774 | ||
775 | return_VOID; | 775 | return_ACPI_STATUS(AE_OK); |
776 | } | 776 | } |
777 | 777 | ||
778 | ACPI_EXPORT_SYMBOL(acpi_dbg_level) | 778 | ACPI_EXPORT_SYMBOL(acpi_dbg_level) |
diff --git a/drivers/acpi/utilities/utxface.c b/drivers/acpi/utilities/utxface.c index f8bdadf3c32f..c198a4d40583 100644 --- a/drivers/acpi/utilities/utxface.c +++ b/drivers/acpi/utilities/utxface.c | |||
@@ -81,7 +81,12 @@ acpi_status __init acpi_initialize_subsystem(void) | |||
81 | 81 | ||
82 | /* Initialize all globals used by the subsystem */ | 82 | /* Initialize all globals used by the subsystem */ |
83 | 83 | ||
84 | acpi_ut_init_globals(); | 84 | status = acpi_ut_init_globals(); |
85 | if (ACPI_FAILURE(status)) { | ||
86 | ACPI_EXCEPTION((AE_INFO, status, | ||
87 | "During initialization of globals")); | ||
88 | return_ACPI_STATUS(status); | ||
89 | } | ||
85 | 90 | ||
86 | /* Create the default mutex objects */ | 91 | /* Create the default mutex objects */ |
87 | 92 | ||
diff --git a/include/acpi/acutils.h b/include/acpi/acutils.h index 69f8888771ff..10ce81406f9c 100644 --- a/include/acpi/acutils.h +++ b/include/acpi/acutils.h | |||
@@ -110,7 +110,7 @@ struct acpi_pkg_info { | |||
110 | /* | 110 | /* |
111 | * utglobal - Global data structures and procedures | 111 | * utglobal - Global data structures and procedures |
112 | */ | 112 | */ |
113 | void acpi_ut_init_globals(void); | 113 | acpi_status acpi_ut_init_globals(void); |
114 | 114 | ||
115 | #if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER) | 115 | #if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER) |
116 | 116 | ||