aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica/nsrepair.c
diff options
context:
space:
mode:
authorLv Zheng <lv.zheng@intel.com>2014-02-25 21:29:40 -0500
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-02-26 18:46:00 -0500
commit61db45ca21630f5ab7f678d54c5d969c21647854 (patch)
tree5af5a7abc1baf616e510bc5c29c4ca4e7a096db4 /drivers/acpi/acpica/nsrepair.c
parent83130649302a238c8a42322444468430aa97a1fd (diff)
ACPICA: Restore code that repairs NULL package elements in return values.
The original code was lost accidently, it was not generated along with the following commit of mechanism improvements and thus not get merged: Commit: d5a36100f62fa6db5541344e08b361b34e9114c5 Subject: ACPICA: Add mechanism for early object repairs on a per-name basis Adds the framework to allow object repairs very early in the return object analysis. Enables repairs like string->unicode, etc. This patch restores the implementation of the NULL element repair code for ACPI_RTYPE_NONE. In the original design, ACPI_RTYPE_NONE is defined to collect simple NULL object repairs. Lv Zheng. Buglink: https://bugzilla.kernel.org/show_bug.cgi?id=67901 Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Cc: 3.10+ <stable@vger.kernel.org> # 3.10+ Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/acpica/nsrepair.c')
-rw-r--r--drivers/acpi/acpica/nsrepair.c25
1 files changed, 21 insertions, 4 deletions
diff --git a/drivers/acpi/acpica/nsrepair.c b/drivers/acpi/acpica/nsrepair.c
index 904f7c3e8a0d..21b6402e5245 100644
--- a/drivers/acpi/acpica/nsrepair.c
+++ b/drivers/acpi/acpica/nsrepair.c
@@ -207,13 +207,30 @@ acpi_ns_simple_repair(struct acpi_evaluate_info *info,
207 * this predefined name. Either one return value is expected, or none, 207 * this predefined name. Either one return value is expected, or none,
208 * for both methods and other objects. 208 * for both methods and other objects.
209 * 209 *
210 * Exit now if there is no return object. Warning if one was expected. 210 * Try to fix if there was no return object. Warning if failed to fix.
211 */ 211 */
212 if (!return_object) { 212 if (!return_object) {
213 if (expected_btypes && (!(expected_btypes & ACPI_RTYPE_NONE))) { 213 if (expected_btypes && (!(expected_btypes & ACPI_RTYPE_NONE))) {
214 ACPI_WARN_PREDEFINED((AE_INFO, info->full_pathname, 214 if (package_index != ACPI_NOT_PACKAGE_ELEMENT) {
215 ACPI_WARN_ALWAYS, 215 ACPI_WARN_PREDEFINED((AE_INFO,
216 "Missing expected return value")); 216 info->full_pathname,
217 ACPI_WARN_ALWAYS,
218 "Found unexpected NULL package element"));
219
220 status =
221 acpi_ns_repair_null_element(info,
222 expected_btypes,
223 package_index,
224 return_object_ptr);
225 if (ACPI_SUCCESS(status)) {
226 return (AE_OK); /* Repair was successful */
227 }
228 } else {
229 ACPI_WARN_PREDEFINED((AE_INFO,
230 info->full_pathname,
231 ACPI_WARN_ALWAYS,
232 "Missing expected return value"));
233 }
217 234
218 return (AE_AML_NO_RETURN_VALUE); 235 return (AE_AML_NO_RETURN_VALUE);
219 } 236 }