diff options
author | Bob Moore <robert.moore@intel.com> | 2009-02-22 22:00:00 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2009-03-26 16:38:28 -0400 |
commit | c114e4b6c606c7f174b752f946fcfb0e7e61a347 (patch) | |
tree | 4e8e9ec4137106c581400de3da40a771e0980ec2 /drivers/acpi/acpica/uteval.c | |
parent | 4f70e371cdf6ab4f988fbaf2257e6259422ba662 (diff) |
ACPICA: Debug output: print result of _OSI invocations
Print input strings and the result (supported or not supported)
for invocations of the _OSI method.
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/acpica/uteval.c')
-rw-r--r-- | drivers/acpi/acpica/uteval.c | 32 |
1 files changed, 21 insertions, 11 deletions
diff --git a/drivers/acpi/acpica/uteval.c b/drivers/acpi/acpica/uteval.c index 99bfbd23258b..9c4ae6f26b9d 100644 --- a/drivers/acpi/acpica/uteval.c +++ b/drivers/acpi/acpica/uteval.c | |||
@@ -98,6 +98,7 @@ acpi_status acpi_ut_osi_implementation(struct acpi_walk_state *walk_state) | |||
98 | acpi_status status; | 98 | acpi_status status; |
99 | union acpi_operand_object *string_desc; | 99 | union acpi_operand_object *string_desc; |
100 | union acpi_operand_object *return_desc; | 100 | union acpi_operand_object *return_desc; |
101 | u32 return_value; | ||
101 | u32 i; | 102 | u32 i; |
102 | 103 | ||
103 | ACPI_FUNCTION_TRACE(ut_osi_implementation); | 104 | ACPI_FUNCTION_TRACE(ut_osi_implementation); |
@@ -116,10 +117,9 @@ acpi_status acpi_ut_osi_implementation(struct acpi_walk_state *walk_state) | |||
116 | return_ACPI_STATUS(AE_NO_MEMORY); | 117 | return_ACPI_STATUS(AE_NO_MEMORY); |
117 | } | 118 | } |
118 | 119 | ||
119 | /* Default return value is 0, NOT-SUPPORTED */ | 120 | /* Default return value is 0, NOT SUPPORTED */ |
120 | 121 | ||
121 | return_desc->integer.value = 0; | 122 | return_value = 0; |
122 | walk_state->return_desc = return_desc; | ||
123 | 123 | ||
124 | /* Compare input string to static table of supported interfaces */ | 124 | /* Compare input string to static table of supported interfaces */ |
125 | 125 | ||
@@ -127,8 +127,11 @@ acpi_status acpi_ut_osi_implementation(struct acpi_walk_state *walk_state) | |||
127 | if (!ACPI_STRCMP | 127 | if (!ACPI_STRCMP |
128 | (string_desc->string.pointer, | 128 | (string_desc->string.pointer, |
129 | acpi_interfaces_supported[i])) { | 129 | acpi_interfaces_supported[i])) { |
130 | return_desc->integer.value = ACPI_UINT32_MAX; | 130 | |
131 | goto done; | 131 | /* The interface is supported */ |
132 | |||
133 | return_value = ACPI_UINT32_MAX; | ||
134 | goto exit; | ||
132 | } | 135 | } |
133 | } | 136 | } |
134 | 137 | ||
@@ -139,15 +142,22 @@ acpi_status acpi_ut_osi_implementation(struct acpi_walk_state *walk_state) | |||
139 | */ | 142 | */ |
140 | status = acpi_os_validate_interface(string_desc->string.pointer); | 143 | status = acpi_os_validate_interface(string_desc->string.pointer); |
141 | if (ACPI_SUCCESS(status)) { | 144 | if (ACPI_SUCCESS(status)) { |
142 | return_desc->integer.value = ACPI_UINT32_MAX; | 145 | |
146 | /* The interface is supported */ | ||
147 | |||
148 | return_value = ACPI_UINT32_MAX; | ||
143 | } | 149 | } |
144 | 150 | ||
145 | done: | 151 | exit: |
146 | ACPI_DEBUG_PRINT_RAW((ACPI_DB_INFO, "ACPI: BIOS _OSI(%s) %ssupported\n", | 152 | ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INFO, |
147 | string_desc->string.pointer, | 153 | "ACPI: BIOS _OSI(%s) is %ssupported\n", |
148 | return_desc->integer.value == 0 ? "not-" : "")); | 154 | string_desc->string.pointer, return_value == 0 ? "not " : "")); |
149 | 155 | ||
150 | return_ACPI_STATUS(AE_OK); | 156 | /* Complete the return value */ |
157 | |||
158 | return_desc->integer.value = return_value; | ||
159 | walk_state->return_desc = return_desc; | ||
160 | return_ACPI_STATUS (AE_OK); | ||
151 | } | 161 | } |
152 | 162 | ||
153 | /******************************************************************************* | 163 | /******************************************************************************* |