diff options
author | Bob Moore <robert.moore@intel.com> | 2012-10-31 02:24:51 +0000 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2012-11-15 00:31:21 +0100 |
commit | 45dcd31547fcd58273423799b12efe0e8371127e (patch) | |
tree | fc89c938a91796caa1ee581f45581a05d806aa16 /drivers/acpi/acpica/nssearch.c | |
parent | 77b67063bb6bce6d475e910d3b886a606d0d91f7 (diff) |
Cleanup of invalid ACPI name handling and repair
Implemented a change/cleanup for the handling of invalid ACPI names.
Names are now validated and repaired only when
1) entering a new name into the namespace and
2) disassembling a named AML opcode. A warning is only displayed in
debug mode or when the interpreter is in "strict" mode, since some
working machines do in fact contain invalid ACPI names.
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/acpica/nssearch.c')
-rw-r--r-- | drivers/acpi/acpica/nssearch.c | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/drivers/acpi/acpica/nssearch.c b/drivers/acpi/acpica/nssearch.c index 456cc859f86..1d2d8ffc1bc 100644 --- a/drivers/acpi/acpica/nssearch.c +++ b/drivers/acpi/acpica/nssearch.c @@ -314,22 +314,7 @@ acpi_ns_search_and_enter(u32 target_name, * this problem, and we want to be able to enable ACPI support for them, * even though there are a few bad names. */ - if (!acpi_ut_valid_acpi_name(target_name)) { - target_name = - acpi_ut_repair_name(ACPI_CAST_PTR(char, &target_name)); - - /* Report warning only if in strict mode or debug mode */ - - if (!acpi_gbl_enable_interpreter_slack) { - ACPI_WARNING((AE_INFO, - "Found bad character(s) in name, repaired: [%4.4s]\n", - ACPI_CAST_PTR(char, &target_name))); - } else { - ACPI_DEBUG_PRINT((ACPI_DB_INFO, - "Found bad character(s) in name, repaired: [%4.4s]\n", - ACPI_CAST_PTR(char, &target_name))); - } - } + acpi_ut_repair_name(ACPI_CAST_PTR(char, &target_name)); /* Try to find the name in the namespace level specified by the caller */ |