From: Rafael J. Wysocki Date: Tue, 8 Sep 2009 21:15:31 +0000 (+0200) Subject: ACPI PM: Replace wakeup.prepared with reference counter X-Git-Tag: v2.6.32-rc1~670^2~16 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9b83ccd2f14f647936dcfbf4a9a20c501007dd69;p=pandora-kernel.git ACPI PM: Replace wakeup.prepared with reference counter The wakeup.prepared flag is used for marking devices that have the wake-up power already enabled, so that the wake-up power is not enabled twice in a row for the same device. This assumes, however, that device wake-up power will only be enabled once, while the device is being prepared for a system-wide sleep transition, and the second attempt is made by acpi_enable_wakeup_device_prep(). With the upcoming PCI wake-up rework this assumption will not hold any more for PCI bridges and the root bridge whose wake-up power may be enabled as a result of wake-up enable propagation from other devices (eg. add-on devices that are not associated with any GPEs). Thus, there may be many attempts to enable wake-up power on a PCI bridge or the root bridge during a system power state transition and it's better to replace wakeup.prepared with a reference counter. Reviewed-by: Matthew Garrett Signed-off-by: Rafael J. Wysocki Signed-off-by: Jesse Barnes --- Reading git-diff-tree failed