]> git.baikalelectronics.ru Git - kernel.git/commit
ACPI / PM: Consolidate device wakeup settings code
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 23 Jun 2017 23:54:39 +0000 (01:54 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 27 Jun 2017 23:52:32 +0000 (01:52 +0200)
commit871b45f31561de33930534d200c34de10020c1d8
tree2dafd73b9608fe34da773fbf77c1b0f23531bd32
parent6c424043e1087d01e1fd46f2f33474f48e6576d0
ACPI / PM: Consolidate device wakeup settings code

Currently, there are two separate ways of handling device wakeup
settings in the ACPI core, depending on whether this is runtime
wakeup or system wakeup (from sleep states).  However, after the
previous commit eliminating the run_wake ACPI device wakeup flag,
there is no difference between the two any more at the ACPI level,
so they can be combined.

For this reason, introduce acpi_pm_set_device_wakeup() to replace both
acpi_pm_device_run_wake() and acpi_pm_device_sleep_wake() and make it
check the ACPI device object's wakeup.valid flag to determine whether
or not the device can be set up to generate wakeup signals.

Also notice that zpodd_enable/disable_run_wake() only call
device_set_run_wake() because acpi_pm_device_run_wake() called
device_run_wake(), which is not done by acpi_pm_set_device_wakeup(),
so drop the now redundant device_set_run_wake() calls from there.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/acpi/device_pm.c
drivers/ata/libata-zpodd.c
drivers/pci/pci-acpi.c
drivers/pnp/pnpacpi/core.c
include/acpi/acpi_bus.h