diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2017-10-14 18:43:15 +0300 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2017-10-17 01:30:03 +0300 |
commit | cbe25ce37d6c2623b5ac09128987e98848a54c6c (patch) | |
tree | 8b82cbdc110601aeadc410ec4dfd72545ecd9dda /drivers/acpi/acpi_lpss.c | |
parent | 048f35ff26a6c1b7297b43ec4376d9fa1872b4a9 (diff) | |
download | linux-cbe25ce37d6c2623b5ac09128987e98848a54c6c.tar.xz |
ACPI / PM: Combine device suspend routines
On top of a previous change getting rid of the PM QoS flag
PM_QOS_FLAG_REMOTE_WAKEUP, combine two ACPI device suspend routines,
acpi_dev_runtime_suspend() and acpi_dev_suspend_late(), into one,
acpi_dev_suspend(), to eliminate some code duplication.
It also avoids enabling wakeup for devices handled by the ACPI
LPSS middle layer on driver removal.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/acpi/acpi_lpss.c')
-rw-r--r-- | drivers/acpi/acpi_lpss.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/acpi/acpi_lpss.c b/drivers/acpi/acpi_lpss.c index 97b753dd2e6e..8ec19e7c7b61 100644 --- a/drivers/acpi/acpi_lpss.c +++ b/drivers/acpi/acpi_lpss.c @@ -713,7 +713,7 @@ static int acpi_lpss_activate(struct device *dev) static void acpi_lpss_dismiss(struct device *dev) { - acpi_dev_runtime_suspend(dev); + acpi_dev_suspend(dev, false); } #ifdef CONFIG_PM_SLEEP @@ -729,7 +729,7 @@ static int acpi_lpss_suspend_late(struct device *dev) if (pdata->dev_desc->flags & LPSS_SAVE_CTX) acpi_lpss_save_ctx(dev, pdata); - return acpi_dev_suspend_late(dev); + return acpi_dev_suspend(dev, device_may_wakeup(dev)); } static int acpi_lpss_resume_early(struct device *dev) @@ -847,7 +847,7 @@ static int acpi_lpss_runtime_suspend(struct device *dev) if (pdata->dev_desc->flags & LPSS_SAVE_CTX) acpi_lpss_save_ctx(dev, pdata); - ret = acpi_dev_runtime_suspend(dev); + ret = acpi_dev_suspend(dev, true); /* * This call must be last in the sequence, otherwise PMC will return |