aboutsummaryrefslogtreecommitdiffstats
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)
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)
646 return -ENODEV; 646 return -ENODEV;
647 } 647 }
648 648
649 if (enable) { 649 error = enable ?
650 error = acpi_enable_wakeup_device_power(adev, 650 acpi_enable_wakeup_device_power(adev, acpi_target_sleep_state) :
651 acpi_target_sleep_state); 651 acpi_disable_wakeup_device_power(adev);
652 if (!error)
653 acpi_enable_gpe(adev->wakeup.gpe_device,
654 adev->wakeup.gpe_number,
655 ACPI_GPE_TYPE_WAKE);
656 } else {
657 acpi_disable_gpe(adev->wakeup.gpe_device, adev->wakeup.gpe_number,
658 ACPI_GPE_TYPE_WAKE);
659 error = acpi_disable_wakeup_device_power(adev);
660 }
661 if (!error) 652 if (!error)
662 dev_info(dev, "wake-up capability %s by ACPI\n", 653 dev_info(dev, "wake-up capability %s by ACPI\n",
663 enable ? "enabled" : "disabled"); 654 enable ? "enabled" : "disabled");