diff options
author | Len Brown <len.brown@intel.com> | 2010-08-15 06:25:40 +0200 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2010-08-15 06:25:40 +0200 |
commit | c172cb73bc79fe69915b1a1a48e374aa4b1f8a59 (patch) | |
tree | eb3d6415914968441c063f7282e824b14b5a5edb /drivers/acpi/sleep.c | |
parent | Merge branch 'bugzilla-16422' into release (diff) | |
parent | ACPI / ACPICA: Fix reference counting problems with GPE handlers (diff) | |
download | linux-c172cb73bc79fe69915b1a1a48e374aa4b1f8a59.tar.xz linux-c172cb73bc79fe69915b1a1a48e374aa4b1f8a59.zip |
Merge branch 'acpica-gpe' into release
Diffstat (limited to 'drivers/acpi/sleep.c')
-rw-r--r-- | drivers/acpi/sleep.c | 15 |
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"); |