aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/sleep
diff options
context:
space:
mode:
authorAlexey Starikovskiy <astarikovskiy@suse.de>2007-09-24 08:33:21 -0400
committerLen Brown <len.brown@intel.com>2007-09-25 17:58:43 -0400
commit2f3f22269bdf702311342c5d106dfdd7347d1c3e (patch)
tree0611dfa66ac93fe796ab198817751e9f9604d768 /drivers/acpi/sleep
parent4942de4a0e914f205d351a81873f4f63986bcc3c (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/sleep')
-rw-r--r--drivers/acpi/sleep/main.c42
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
27static u32 acpi_target_sleep_state = ACPI_STATE_S0; 27static u32 acpi_target_sleep_state = ACPI_STATE_S0;
28 28
29int 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
30static struct pm_ops acpi_pm_ops; 51static 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
63int 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