summaryrefslogtreecommitdiff
path: root/drivers/acpi/sleep.c
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2010-08-15 00:25:40 -0400
committerLen Brown <len.brown@intel.com>2010-08-15 00:25:40 -0400
commitc172cb73bc79fe69915b1a1a48e374aa4b1f8a59 (patch)
treeeb3d6415914968441c063f7282e824b14b5a5edb /drivers/acpi/sleep.c
parente8eb6228094bcf0c84d9aa32b6363e78da68e1f5 (diff)
parent28f4f8a9def2b1f3a6066bae791c77043ec49524 (diff)
downloadlinux-rt-c172cb73bc79fe69915b1a1a48e374aa4b1f8a59.tar.gz
Merge branch 'acpica-gpe' into release
Diffstat (limited to 'drivers/acpi/sleep.c')
-rw-r--r--drivers/acpi/sleep.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c
index e4625f919814..cf82989ae756 100644
--- a/drivers/acpi/sleep.c
+++ b/drivers/acpi/sleep.c
@@ -646,18 +646,9 @@ int acpi_pm_device_sleep_wake(struct device *dev, bool enable)
return -ENODEV;
}
- if (enable) {
- error = acpi_enable_wakeup_device_power(adev,
- acpi_target_sleep_state);
- if (!error)
- acpi_enable_gpe(adev->wakeup.gpe_device,
- adev->wakeup.gpe_number,
- ACPI_GPE_TYPE_WAKE);
- } else {
- acpi_disable_gpe(adev->wakeup.gpe_device, adev->wakeup.gpe_number,
- ACPI_GPE_TYPE_WAKE);
- error = acpi_disable_wakeup_device_power(adev);
- }
+ error = enable ?
+ acpi_enable_wakeup_device_power(adev, acpi_target_sleep_state) :
+ acpi_disable_wakeup_device_power(adev);
if (!error)
dev_info(dev, "wake-up capability %s by ACPI\n",
enable ? "enabled" : "disabled");