X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Facpi%2Fevents%2Fevxfevnt.c;h=17065e98807c1921d1fcee9aa51d5423fd84ffd3;hb=5a84d159061d914c8dd4aa372ac6e9529c2be453;hp=7ebc2efac936ce5a2d3a7005a508fe658580af4c;hpb=6fa0cb1141da80eed4f86155fb51931bc1c31888;p=linux-2.6 diff --git a/drivers/acpi/events/evxfevnt.c b/drivers/acpi/events/evxfevnt.c index 7ebc2efac9..17065e9880 100644 --- a/drivers/acpi/events/evxfevnt.c +++ b/drivers/acpi/events/evxfevnt.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2006, R. Byron Moore + * Copyright (C) 2000 - 2007, R. Byron Moore * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -44,6 +44,7 @@ #include #include #include +#include #define _COMPONENT ACPI_EVENTS ACPI_MODULE_NAME("evxfevnt") @@ -65,13 +66,14 @@ acpi_status acpi_enable(void) ACPI_FUNCTION_TRACE(acpi_enable); - /* Make sure we have the FADT */ + /* ACPI tables must be present */ - if (!acpi_gbl_FADT) { - ACPI_WARNING((AE_INFO, "No FADT information present!")); + if (!acpi_tb_tables_loaded()) { return_ACPI_STATUS(AE_NO_ACPI_TABLES); } + /* Check current mode */ + if (acpi_hw_get_mode() == ACPI_SYS_MODE_ACPI) { ACPI_DEBUG_PRINT((ACPI_DB_INIT, "System is already in ACPI mode\n")); @@ -111,11 +113,6 @@ acpi_status acpi_disable(void) ACPI_FUNCTION_TRACE(acpi_disable); - if (!acpi_gbl_FADT) { - ACPI_WARNING((AE_INFO, "No FADT information present!")); - return_ACPI_STATUS(AE_NO_ACPI_TABLES); - } - if (acpi_hw_get_mode() == ACPI_SYS_MODE_LEGACY) { ACPI_DEBUG_PRINT((ACPI_DB_INIT, "System is already in legacy (non-ACPI) mode\n")); @@ -169,7 +166,7 @@ acpi_status acpi_enable_event(u32 event, u32 flags) */ status = acpi_set_register(acpi_gbl_fixed_event_info[event]. - enable_register_id, 1, ACPI_MTX_LOCK); + enable_register_id, 1); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } @@ -178,7 +175,7 @@ acpi_status acpi_enable_event(u32 event, u32 flags) status = acpi_get_register(acpi_gbl_fixed_event_info[event]. - enable_register_id, &value, ACPI_MTX_LOCK); + enable_register_id, &value); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } @@ -368,14 +365,14 @@ acpi_status acpi_disable_event(u32 event, u32 flags) */ status = acpi_set_register(acpi_gbl_fixed_event_info[event]. - enable_register_id, 0, ACPI_MTX_LOCK); + enable_register_id, 0); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } status = acpi_get_register(acpi_gbl_fixed_event_info[event]. - enable_register_id, &value, ACPI_MTX_LOCK); + enable_register_id, &value); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } @@ -421,7 +418,7 @@ acpi_status acpi_clear_event(u32 event) */ status = acpi_set_register(acpi_gbl_fixed_event_info[event]. - status_register_id, 1, ACPI_MTX_LOCK); + status_register_id, 1); return_ACPI_STATUS(status); } @@ -510,7 +507,7 @@ acpi_status acpi_get_event_status(u32 event, acpi_event_status * event_status) status = acpi_get_register(acpi_gbl_fixed_event_info[event]. - status_register_id, event_status, ACPI_MTX_LOCK); + status_register_id, event_status); return_ACPI_STATUS(status); }