• Rafael J. Wysocki's avatar
    ACPI / PM: Allow device power states to be used for CONFIG_PM unset · ec4602a9
    Rafael J. Wysocki authored
    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: default avatarZhang Rui <rui.zhang@intel.com>
    Reported-and-tested-by: default avatarMichel Lespinasse <walken@google.com>
    Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
    Cc: 3.9+ <stable@vger.kernel.org>
    ec4602a9
device_pm.c 28.9 KB