From: Lorenzo Pieralisi Date: Wed, 25 Mar 2015 15:13:56 +0000 (+0000) Subject: ARM64: kernel: acpi: refactor ACPI tables init and checks X-Git-Tag: omap-for-v4.2/o2_dc~26^2~4 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=54971e43b9d6cb37366d2da64cc5a2d8f8102bc4;p=pandora-kernel.git ARM64: kernel: acpi: refactor ACPI tables init and checks Current ACPI init code on ARM64 relies on acpi_table_parse() API to check if the FADT is present and to carry out sanity checks on that. The handler passed to the acpi_table_parse() function and used to carry out the parsing on the requested table returns a value that is ignored by the acpi_table_parse() function, so it is not possible to propagate errors back to the acpi_table_parse() caller through the handler. This forces ARM64 ACPI init code to have disable_acpi() calls scattered all over the place that makes code unwieldy and not easy to follow. This patch refactors the ARM64 ACPI init code, by creating a self-contained function (ie acpi_fadt_sanity_check()) that carries out the required checks on FADT and returns an adequate return value to the caller. This allows creating a common error path that disables ACPI and makes code more readable and easy to parse and change were further checks FADT to be added in the future. Signed-off-by: Lorenzo Pieralisi Reviewed-by: Hanjun Guo Cc: Will Deacon Cc: Hanjun Guo Cc: Catalin Marinas Cc: Rafael J. Wysocki Signed-off-by: Will Deacon --- Reading git-diff-tree failed