ACPI / PM: Move device PM functions related to sleep states

Introduce helper function returning the target sleep state of the
system and use it to move the remaining device power management
functions from sleep.c to device_pm.c.

Signed-off-by: Rafael J. Wysocki <[email protected]>
This commit is contained in:
Rafael J. Wysocki 2012-11-02 01:40:53 +01:00
commit a6ae7594b1
3 changed files with 62 additions and 57 deletions

View file

@ -470,9 +470,11 @@ static inline int acpi_pm_device_run_wake(struct device *dev, bool enable)
#endif
#ifdef CONFIG_PM_SLEEP
u32 acpi_target_system_state(void);
int __acpi_device_sleep_wake(struct acpi_device *, u32, bool);
int acpi_pm_device_sleep_wake(struct device *, bool);
#else
static inline u32 acpi_target_system_state(void) { return ACPI_STATE_S0; }
static inline int __acpi_device_sleep_wake(struct acpi_device *adev,
u32 target_state, bool enable)
{