diff options
author | Alexey Starikovskiy <astarikovskiy@suse.de> | 2007-09-24 08:33:21 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2007-09-25 17:58:43 -0400 |
commit | 2f3f22269bdf702311342c5d106dfdd7347d1c3e (patch) | |
tree | 0611dfa66ac93fe796ab198817751e9f9604d768 /drivers/acpi | |
parent | 4942de4a0e914f205d351a81873f4f63986bcc3c (diff) |
ACPI: suspend: build-fix for CONFIG_SUSPEND=n and CONFIG_HIBERNATION=y
This fixes compilation with CONFIG_SUSPEND unset and CONFIG_HIBERNATION set
(raf. http://marc.info/?l=linux-acpi&m=119055289723895&w=4).
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/sleep/main.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/drivers/acpi/sleep/main.c b/drivers/acpi/sleep/main.c index 85633c585aab..c79edcb8e842 100644 --- a/drivers/acpi/sleep/main.c +++ b/drivers/acpi/sleep/main.c | |||
@@ -26,6 +26,27 @@ u8 sleep_states[ACPI_S_STATE_COUNT]; | |||
26 | 26 | ||
27 | static u32 acpi_target_sleep_state = ACPI_STATE_S0; | 27 | static u32 acpi_target_sleep_state = ACPI_STATE_S0; |
28 | 28 | ||
29 | int acpi_sleep_prepare(u32 acpi_state) | ||
30 | { | ||
31 | #ifdef CONFIG_ACPI_SLEEP | ||
32 | /* do we have a wakeup address for S2 and S3? */ | ||
33 | if (acpi_state == ACPI_STATE_S3) { | ||
34 | if (!acpi_wakeup_address) { | ||
35 | return -EFAULT; | ||
36 | } | ||
37 | acpi_set_firmware_waking_vector((acpi_physical_address) | ||
38 | virt_to_phys((void *) | ||
39 | acpi_wakeup_address)); | ||
40 | |||
41 | } | ||
42 | ACPI_FLUSH_CPU_CACHE(); | ||
43 | acpi_enable_wakeup_device_prep(acpi_state); | ||
44 | #endif | ||
45 | acpi_gpe_sleep_prepare(acpi_state); | ||
46 | acpi_enter_sleep_state_prep(acpi_state); | ||
47 | return 0; | ||
48 | } | ||
49 | |||
29 | #ifdef CONFIG_SUSPEND | 50 | #ifdef CONFIG_SUSPEND |
30 | static struct pm_ops acpi_pm_ops; | 51 | static struct pm_ops acpi_pm_ops; |
31 | 52 | ||
@@ -60,27 +81,6 @@ static int acpi_pm_set_target(suspend_state_t pm_state) | |||
60 | return error; | 81 | return error; |
61 | } | 82 | } |
62 | 83 | ||
63 | int acpi_sleep_prepare(u32 acpi_state) | ||
64 | { | ||
65 | #ifdef CONFIG_ACPI_SLEEP | ||
66 | /* do we have a wakeup address for S2 and S3? */ | ||
67 | if (acpi_state == ACPI_STATE_S3) { | ||
68 | if (!acpi_wakeup_address) { | ||
69 | return -EFAULT; | ||
70 | } | ||
71 | acpi_set_firmware_waking_vector((acpi_physical_address) | ||
72 | virt_to_phys((void *) | ||
73 | acpi_wakeup_address)); | ||
74 | |||
75 | } | ||
76 | ACPI_FLUSH_CPU_CACHE(); | ||
77 | acpi_enable_wakeup_device_prep(acpi_state); | ||
78 | #endif | ||
79 | acpi_gpe_sleep_prepare(acpi_state); | ||
80 | acpi_enter_sleep_state_prep(acpi_state); | ||
81 | return 0; | ||
82 | } | ||
83 | |||
84 | /** | 84 | /** |
85 | * acpi_pm_prepare - Do preliminary suspend work. | 85 | * acpi_pm_prepare - Do preliminary suspend work. |
86 | * @pm_state: ignored | 86 | * @pm_state: ignored |