From fd7b719857b57cddf59bc556951b15eba4b77242 Mon Sep 17 00:00:00 2001 From: Bob Moore Date: Fri, 2 Feb 2007 19:48:22 +0300 Subject: [PATCH] --- yaml --- r: 46403 b: refs/heads/master c: 8876016bb384044a59c1e2ddcad4cf41b06344b9 h: refs/heads/master i: 46401: 3ca58170c39f5969e896bd49e289e3f7b64500d7 46399: a4689ed8e54fbdb70601502cf6cf7cbb67a1d81f v: v3 --- [refs] | 2 +- trunk/drivers/acpi/events/evmisc.c | 33 ++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 402beb3365a4..b7c948dca225 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a6823e12ca3f79a8c0f8b2d14976ab2152d117e5 +refs/heads/master: 8876016bb384044a59c1e2ddcad4cf41b06344b9 diff --git a/trunk/drivers/acpi/events/evmisc.c b/trunk/drivers/acpi/events/evmisc.c index 545f934d7817..db16300434eb 100644 --- a/trunk/drivers/acpi/events/evmisc.c +++ b/trunk/drivers/acpi/events/evmisc.c @@ -73,6 +73,8 @@ static void ACPI_SYSTEM_XFACE acpi_ev_notify_dispatch(void *context); static u32 acpi_ev_global_lock_handler(void *context); +static acpi_status acpi_ev_remove_global_lock_handler(void); + /******************************************************************************* * * FUNCTION: acpi_ev_is_notify_object @@ -376,6 +378,31 @@ acpi_status acpi_ev_init_global_lock_handler(void) return_ACPI_STATUS(status); } +/******************************************************************************* + * + * FUNCTION: acpi_ev_remove_global_lock_handler + * + * PARAMETERS: None + * + * RETURN: Status + * + * DESCRIPTION: Remove the handler for the Global Lock + * + ******************************************************************************/ + +static acpi_status acpi_ev_remove_global_lock_handler(void) +{ + acpi_status status; + + ACPI_FUNCTION_TRACE(ev_remove_global_lock_handler); + + acpi_gbl_global_lock_present = FALSE; + status = acpi_remove_fixed_event_handler(ACPI_EVENT_GLOBAL, + acpi_ev_global_lock_handler); + + return_ACPI_STATUS(status); +} + /****************************************************************************** * * FUNCTION: acpi_ev_acquire_global_lock @@ -554,6 +581,12 @@ void acpi_ev_terminate(void) if (ACPI_FAILURE(status)) { ACPI_ERROR((AE_INFO, "Could not remove SCI handler")); } + + status = acpi_ev_remove_global_lock_handler(); + if (ACPI_FAILURE(status)) { + ACPI_ERROR((AE_INFO, + "Could not remove Global Lock handler")); + } } /* Deallocate all handler objects installed within GPE info structs */