From: Rafael J. Wysocki Date: Wed, 7 Jul 2010 22:42:51 +0000 (+0200) Subject: ACPI: Fix bogus GPE test in acpi_bus_set_run_wake_flags() X-Git-Tag: firefly_0821_release~9833^2~1226^2~3 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=e8e18c956152ec9c26c94c6401c174691a8f04e7;p=firefly-linux-kernel-4.4.55.git ACPI: Fix bogus GPE test in acpi_bus_set_run_wake_flags() When we check if a GPE can be used for runtime signaling, we only search the FADT GPE blocks, which is incorrect, becuase the GPE may be located elsewhere. We really should be using the GPE device information previously returned by _PRW here, so make that happen. Signed-off-by: Rafael J. Wysocki Signed-off-by: Len Brown --- diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index 7f2e051ed4f1..449ada016d81 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c @@ -764,8 +764,9 @@ static void acpi_bus_set_run_wake_flags(struct acpi_device *device) return; } - status = acpi_get_gpe_status(NULL, device->wakeup.gpe_number, - &event_status); + status = acpi_get_gpe_status(device->wakeup.gpe_device, + device->wakeup.gpe_number, + &event_status); if (status == AE_OK) device->wakeup.flags.run_wake = !!(event_status & ACPI_EVENT_FLAG_HANDLE);