aboutsummaryrefslogtreecommitdiffstats
path: root/include/acpi/acpi_bus.h
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2009-09-08 17:15:31 -0400
committerJesse Barnes <jbarnes@virtuousgeek.org>2009-09-09 17:19:18 -0400
commit9b83ccd2f14f647936dcfbf4a9a20c501007dd69 (patch)
treebc405d4c14635ff309a5f39c905ede40fc762916 /include/acpi/acpi_bus.h
parente80bb09d2c73d76a2a4cd79e4a83802dd901c642 (diff)
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 <mjg59@srcf.ucam.org> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'include/acpi/acpi_bus.h')
-rw-r--r--include/acpi/acpi_bus.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
index c3ace75d57b4..1fa3ffb7c93b 100644
--- a/include/acpi/acpi_bus.h
+++ b/include/acpi/acpi_bus.h
@@ -248,7 +248,6 @@ struct acpi_device_perf {
248/* Wakeup Management */ 248/* Wakeup Management */
249struct acpi_device_wakeup_flags { 249struct acpi_device_wakeup_flags {
250 u8 valid:1; /* Can successfully enable wakeup? */ 250 u8 valid:1; /* Can successfully enable wakeup? */
251 u8 prepared:1; /* Has the wake-up capability been enabled? */
252 u8 run_wake:1; /* Run-Wake GPE devices */ 251 u8 run_wake:1; /* Run-Wake GPE devices */
253}; 252};
254 253
@@ -263,6 +262,7 @@ struct acpi_device_wakeup {
263 struct acpi_handle_list resources; 262 struct acpi_handle_list resources;
264 struct acpi_device_wakeup_state state; 263 struct acpi_device_wakeup_state state;
265 struct acpi_device_wakeup_flags flags; 264 struct acpi_device_wakeup_flags flags;
265 int prepare_count;
266}; 266};
267 267
268/* Device */ 268/* Device */