diff options
author | Len Brown <len.brown@intel.com> | 2010-08-15 00:25:40 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2010-08-15 00:25:40 -0400 |
commit | c172cb73bc79fe69915b1a1a48e374aa4b1f8a59 (patch) | |
tree | eb3d6415914968441c063f7282e824b14b5a5edb /drivers/acpi/wakeup.c | |
parent | e8eb6228094bcf0c84d9aa32b6363e78da68e1f5 (diff) | |
parent | 28f4f8a9def2b1f3a6066bae791c77043ec49524 (diff) |
Merge branch 'acpica-gpe' into release
Diffstat (limited to 'drivers/acpi/wakeup.c')
-rw-r--r-- | drivers/acpi/wakeup.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/drivers/acpi/wakeup.c b/drivers/acpi/wakeup.c index dc6d1d9112fb..f62a50c3ed34 100644 --- a/drivers/acpi/wakeup.c +++ b/drivers/acpi/wakeup.c | |||
@@ -36,7 +36,8 @@ void acpi_enable_wakeup_devices(u8 sleep_state) | |||
36 | struct acpi_device *dev = | 36 | struct acpi_device *dev = |
37 | container_of(node, struct acpi_device, wakeup_list); | 37 | container_of(node, struct acpi_device, wakeup_list); |
38 | 38 | ||
39 | if (!dev->wakeup.flags.valid || !dev->wakeup.state.enabled | 39 | if (!dev->wakeup.flags.valid |
40 | || !(dev->wakeup.state.enabled || dev->wakeup.prepare_count) | ||
40 | || sleep_state > (u32) dev->wakeup.sleep_state) | 41 | || sleep_state > (u32) dev->wakeup.sleep_state) |
41 | continue; | 42 | continue; |
42 | 43 | ||
@@ -44,8 +45,8 @@ void acpi_enable_wakeup_devices(u8 sleep_state) | |||
44 | acpi_enable_wakeup_device_power(dev, sleep_state); | 45 | acpi_enable_wakeup_device_power(dev, sleep_state); |
45 | 46 | ||
46 | /* The wake-up power should have been enabled already. */ | 47 | /* The wake-up power should have been enabled already. */ |
47 | acpi_enable_gpe(dev->wakeup.gpe_device, dev->wakeup.gpe_number, | 48 | acpi_gpe_wakeup(dev->wakeup.gpe_device, dev->wakeup.gpe_number, |
48 | ACPI_GPE_TYPE_WAKE); | 49 | ACPI_GPE_ENABLE); |
49 | } | 50 | } |
50 | } | 51 | } |
51 | 52 | ||
@@ -61,13 +62,16 @@ void acpi_disable_wakeup_devices(u8 sleep_state) | |||
61 | struct acpi_device *dev = | 62 | struct acpi_device *dev = |
62 | container_of(node, struct acpi_device, wakeup_list); | 63 | container_of(node, struct acpi_device, wakeup_list); |
63 | 64 | ||
64 | if (!dev->wakeup.flags.valid || !dev->wakeup.state.enabled | 65 | if (!dev->wakeup.flags.valid |
66 | || !(dev->wakeup.state.enabled || dev->wakeup.prepare_count) | ||
65 | || (sleep_state > (u32) dev->wakeup.sleep_state)) | 67 | || (sleep_state > (u32) dev->wakeup.sleep_state)) |
66 | continue; | 68 | continue; |
67 | 69 | ||
68 | acpi_disable_gpe(dev->wakeup.gpe_device, dev->wakeup.gpe_number, | 70 | acpi_gpe_wakeup(dev->wakeup.gpe_device, dev->wakeup.gpe_number, |
69 | ACPI_GPE_TYPE_WAKE); | 71 | ACPI_GPE_DISABLE); |
70 | acpi_disable_wakeup_device_power(dev); | 72 | |
73 | if (dev->wakeup.state.enabled) | ||
74 | acpi_disable_wakeup_device_power(dev); | ||
71 | } | 75 | } |
72 | } | 76 | } |
73 | 77 | ||