From 9ce10df8d83d0528e80cd319b35ac5f6812b4f62 Mon Sep 17 00:00:00 2001 From: "Rafael J. Wysocki" Date: Thu, 8 Jul 2010 00:45:34 +0200 Subject: ACPI / ACPICA: Fail acpi_gpe_wakeup() if ACPI_GPE_CAN_WAKE is unset Make acpi_gpe_wakeup() return error code for GPEs whose ACPI_GPE_CAN_WAKE flag is not set. This way acpi_gpe_wakeup() will only wake for the GPEs reported by the host OS as "wakeup" ones with the help of acpi_gpe_can_wake(). Signed-off-by: Rafael J. Wysocki Signed-off-by: Len Brown --- drivers/acpi/acpica/evxfevnt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/acpi/acpica') diff --git a/drivers/acpi/acpica/evxfevnt.c b/drivers/acpi/acpica/evxfevnt.c index bd06fad83e7a..53d591a11138 100644 --- a/drivers/acpi/acpica/evxfevnt.c +++ b/drivers/acpi/acpica/evxfevnt.c @@ -236,7 +236,7 @@ acpi_status acpi_gpe_wakeup(acpi_handle gpe_device, u32 gpe_number, u8 action) /* Ensure that we have a valid GPE number */ gpe_event_info = acpi_ev_get_gpe_event_info(gpe_device, gpe_number); - if (!gpe_event_info) { + if (!gpe_event_info || !(gpe_event_info->flags & ACPI_GPE_CAN_WAKE)) { status = AE_BAD_PARAMETER; goto unlock_and_exit; } -- cgit v1.2.3