summaryrefslogtreecommitdiff
path: root/include/linux/acpi.h
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2012-12-23 03:02:44 +0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-01-03 16:09:41 +0400
commitd2e5f0c16ad60a7208fd371233e63b73c990ece2 (patch)
treec8d7913c537e4fbb076e1491f6f3e72d648a8391 /include/linux/acpi.h
parent11909ca1cf614f9396b17d366f9e3cfcba7b4a99 (diff)
downloadlinux-d2e5f0c16ad60a7208fd371233e63b73c990ece2.tar.xz
ACPI / PCI: Rework the setup and cleanup of device wakeup
Currently, the ACPI wakeup capability of PCI devices is set up in two different places, partially in acpi_pci_bind() where runtime wakeup is initialized and partially in platform_pci_wakeup_init(), where system wakeup is initialized. The cleanup is only done in acpi_pci_unbind() and it only covers runtime wakeup. Use the new .setup() and .cleanup() callbacks in struct acpi_bus_type to consolidate that code and do the setup and the cleanup each in one place. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Yinghai Lu <yinghai@kernel.org> Acked-by: Toshi Kani <toshi.kani@hp.com>
Diffstat (limited to 'include/linux/acpi.h')
-rw-r--r--include/linux/acpi.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index 3994d7790b23..8c1d6f2a2193 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -526,9 +526,14 @@ static inline int acpi_subsys_resume_early(struct device *dev) { return 0; }
#endif
#if defined(CONFIG_ACPI) && defined(CONFIG_PM)
+struct acpi_device *acpi_dev_pm_get_node(struct device *dev);
int acpi_dev_pm_attach(struct device *dev, bool power_on);
void acpi_dev_pm_detach(struct device *dev, bool power_off);
#else
+static inline struct acpi_device *acpi_dev_pm_get_node(struct device *dev)
+{
+ return NULL;
+}
static inline int acpi_dev_pm_attach(struct device *dev, bool power_on)
{
return -ENODEV;