]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
ACPI: Fix bogus GPE test in acpi_bus_set_run_wake_flags()
authorRafael J. Wysocki <rjw@sisk.pl>
Wed, 7 Jul 2010 22:42:51 +0000 (00:42 +0200)
committerLen Brown <len.brown@intel.com>
Mon, 12 Jul 2010 18:17:19 +0000 (14:17 -0400)
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 <rjw@sisk.pl>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/acpi/scan.c

index 7f2e051ed4f1f21cc2c920aeaf444d45f5e3af02..449ada016d81278861d24bddfe070c6bc5bf261e 100644 (file)
@@ -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);