From c857303ad496e1f52955e95994a67869882e89f9 Mon Sep 17 00:00:00 2001 From: Bob Moore Date: Fri, 2 Feb 2007 19:48:23 +0300 Subject: ACPICA: Fail AcpiEnable if ACPI tables not loaded. AcpiEnable will now fail if all of the required ACPI tables are not loaded (FADT, FACS, DSDT). BZ 477 Signed-off-by: Alexey Starikovskiy Signed-off-by: Len Brown --- drivers/acpi/tables/tbutils.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'drivers/acpi/tables') diff --git a/drivers/acpi/tables/tbutils.c b/drivers/acpi/tables/tbutils.c index 0cb743962faf..0874ab299784 100644 --- a/drivers/acpi/tables/tbutils.c +++ b/drivers/acpi/tables/tbutils.c @@ -52,6 +52,29 @@ static acpi_physical_address acpi_tb_get_root_table_entry(u8 * table_entry, acpi_native_uint table_entry_size); +/******************************************************************************* + * + * FUNCTION: acpi_tb_tables_loaded + * + * PARAMETERS: None + * + * RETURN: TRUE if required ACPI tables are loaded + * + * DESCRIPTION: Determine if the minimum required ACPI tables are present + * (FADT, FACS, DSDT) + * + ******************************************************************************/ + +u8 acpi_tb_tables_loaded(void) +{ + + if (acpi_gbl_root_table_list.count >= 3) { + return (TRUE); + } + + return (FALSE); +} + /******************************************************************************* * * FUNCTION: acpi_tb_print_table_header -- cgit v1.2.3