]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 7 Jun 2013 19:53:23 +0000 (12:53 -0700)
commit8a031713e071cd0576b77e4cc171fabc6a828a7b
tree66b4415ed02bfbccc07b9b06d4c78119ee692cb1
parent2bd3458fcd2cdf088066f5707cf48b6082e534bc
ACPI / PM: Allow device power states to be used for CONFIG_PM unset

commit ec4602a9588a196fa1a9af46bfdd37cbf5792db4 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/acpi/Makefile
drivers/acpi/device_pm.c
include/acpi/acpi_bus.h