]> git.baikalelectronics.ru Git - kernel.git/commit
ACPI / PM: Allow device power states to be used for CONFIG_PM unset
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 16 May 2013 20:29:28 +0000 (22:29 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 21 May 2013 22:19:28 +0000 (00:19 +0200)
commitf54ad5d5ac77785678038b6f3fe03fbf228c4931
treea7b21b2f8afd0f3b1796311ded8128dcdd38a9ab
parent2187cc16d19b7c024d3688db93fabe2573ab34fa
ACPI / PM: Allow device power states to be used for CONFIG_PM unset

Currently, drivers/acpi/device_pm.c depends on CONFIG_PM and all of
the functions defined in there are replaced with static inline stubs
if that option is unset.  However, CONFIG_PM means, roughly, "runtime
PM or suspend/hibernation support" and some of those functions are
useful regardless of that.  For example, they are used by the ACPI
fan driver for controlling fans and acpi_device_set_power() is called
during device removal.  Moreover, device initialization may depend on
setting device power states properly.

For these reasons, make the routines manipulating ACPI device power
states defined in drivers/acpi/device_pm.c available for CONFIG_PM
unset too.

Reported-by: Zhang Rui <rui.zhang@intel.com>
Reported-and-tested-by: Michel Lespinasse <walken@google.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Cc: 3.9+ <stable@vger.kernel.org>
drivers/acpi/Makefile
drivers/acpi/device_pm.c
include/acpi/acpi_bus.h