diff options
Diffstat (limited to 'drivers/acpi/sleep')
-rw-r--r-- | drivers/acpi/sleep/Makefile | 4 | ||||
-rw-r--r-- | drivers/acpi/sleep/main.c | 7 | ||||
-rw-r--r-- | drivers/acpi/sleep/poweroff.c | 2 | ||||
-rw-r--r-- | drivers/acpi/sleep/proc.c | 20 | ||||
-rw-r--r-- | drivers/acpi/sleep/wakeup.c | 2 |
5 files changed, 18 insertions, 17 deletions
diff --git a/drivers/acpi/sleep/Makefile b/drivers/acpi/sleep/Makefile index d6c017709c85..01a993a1d086 100644 --- a/drivers/acpi/sleep/Makefile +++ b/drivers/acpi/sleep/Makefile | |||
@@ -1,5 +1,5 @@ | |||
1 | obj-y := poweroff.o wakeup.o | 1 | obj-y := poweroff.o wakeup.o |
2 | obj-$(CONFIG_ACPI_SLEEP) += main.o | 2 | obj-y += main.o |
3 | obj-$(CONFIG_ACPI_SLEEP_PROC_FS) += proc.o | 3 | obj-$(CONFIG_X86) += proc.o |
4 | 4 | ||
5 | EXTRA_CFLAGS += $(ACPI_CFLAGS) | 5 | EXTRA_CFLAGS += $(ACPI_CFLAGS) |
diff --git a/drivers/acpi/sleep/main.c b/drivers/acpi/sleep/main.c index 29bdb013f46c..ab21357c5c7b 100644 --- a/drivers/acpi/sleep/main.c +++ b/drivers/acpi/sleep/main.c | |||
@@ -154,10 +154,12 @@ static int acpi_pm_finish(suspend_state_t pm_state) | |||
154 | 154 | ||
155 | acpi_target_sleep_state = ACPI_STATE_S0; | 155 | acpi_target_sleep_state = ACPI_STATE_S0; |
156 | 156 | ||
157 | #ifdef CONFIG_X86 | ||
157 | if (init_8259A_after_S1) { | 158 | if (init_8259A_after_S1) { |
158 | printk("Broken toshiba laptop -> kicking interrupts\n"); | 159 | printk("Broken toshiba laptop -> kicking interrupts\n"); |
159 | init_8259A(0); | 160 | init_8259A(0); |
160 | } | 161 | } |
162 | #endif | ||
161 | return 0; | 163 | return 0; |
162 | } | 164 | } |
163 | 165 | ||
@@ -229,11 +231,6 @@ static void acpi_hibernation_finish(void) | |||
229 | 231 | ||
230 | /* reset firmware waking vector */ | 232 | /* reset firmware waking vector */ |
231 | acpi_set_firmware_waking_vector((acpi_physical_address) 0); | 233 | acpi_set_firmware_waking_vector((acpi_physical_address) 0); |
232 | |||
233 | if (init_8259A_after_S1) { | ||
234 | printk("Broken toshiba laptop -> kicking interrupts\n"); | ||
235 | init_8259A(0); | ||
236 | } | ||
237 | } | 234 | } |
238 | 235 | ||
239 | static int acpi_hibernation_pre_restore(void) | 236 | static int acpi_hibernation_pre_restore(void) |
diff --git a/drivers/acpi/sleep/poweroff.c b/drivers/acpi/sleep/poweroff.c index 39e40d56b034..b3f68ef0669e 100644 --- a/drivers/acpi/sleep/poweroff.c +++ b/drivers/acpi/sleep/poweroff.c | |||
@@ -18,7 +18,6 @@ | |||
18 | 18 | ||
19 | int acpi_sleep_prepare(u32 acpi_state) | 19 | int acpi_sleep_prepare(u32 acpi_state) |
20 | { | 20 | { |
21 | #ifdef CONFIG_ACPI_SLEEP | ||
22 | /* do we have a wakeup address for S2 and S3? */ | 21 | /* do we have a wakeup address for S2 and S3? */ |
23 | if (acpi_state == ACPI_STATE_S3) { | 22 | if (acpi_state == ACPI_STATE_S3) { |
24 | if (!acpi_wakeup_address) { | 23 | if (!acpi_wakeup_address) { |
@@ -31,7 +30,6 @@ int acpi_sleep_prepare(u32 acpi_state) | |||
31 | } | 30 | } |
32 | ACPI_FLUSH_CPU_CACHE(); | 31 | ACPI_FLUSH_CPU_CACHE(); |
33 | acpi_enable_wakeup_device_prep(acpi_state); | 32 | acpi_enable_wakeup_device_prep(acpi_state); |
34 | #endif | ||
35 | acpi_gpe_sleep_prepare(acpi_state); | 33 | acpi_gpe_sleep_prepare(acpi_state); |
36 | acpi_enter_sleep_state_prep(acpi_state); | 34 | acpi_enter_sleep_state_prep(acpi_state); |
37 | return 0; | 35 | return 0; |
diff --git a/drivers/acpi/sleep/proc.c b/drivers/acpi/sleep/proc.c index 61f1822cc350..ed58e1168aed 100644 --- a/drivers/acpi/sleep/proc.c +++ b/drivers/acpi/sleep/proc.c | |||
@@ -14,8 +14,16 @@ | |||
14 | #include "sleep.h" | 14 | #include "sleep.h" |
15 | 15 | ||
16 | #define _COMPONENT ACPI_SYSTEM_COMPONENT | 16 | #define _COMPONENT ACPI_SYSTEM_COMPONENT |
17 | |||
18 | /* | ||
19 | * this file provides support for: | ||
20 | * /proc/acpi/sleep | ||
21 | * /proc/acpi/alarm | ||
22 | * /proc/acpi/wakeup | ||
23 | */ | ||
24 | |||
17 | ACPI_MODULE_NAME("sleep") | 25 | ACPI_MODULE_NAME("sleep") |
18 | #ifdef CONFIG_ACPI_SLEEP_PROC_SLEEP | 26 | #ifdef CONFIG_ACPI_PROCFS |
19 | static int acpi_system_sleep_seq_show(struct seq_file *seq, void *offset) | 27 | static int acpi_system_sleep_seq_show(struct seq_file *seq, void *offset) |
20 | { | 28 | { |
21 | int i; | 29 | int i; |
@@ -68,7 +76,7 @@ acpi_system_write_sleep(struct file *file, | |||
68 | Done: | 76 | Done: |
69 | return error ? error : count; | 77 | return error ? error : count; |
70 | } | 78 | } |
71 | #endif /* CONFIG_ACPI_SLEEP_PROC_SLEEP */ | 79 | #endif /* CONFIG_ACPI_PROCFS */ |
72 | 80 | ||
73 | #if defined(CONFIG_RTC_DRV_CMOS) || defined(CONFIG_RTC_DRV_CMOS_MODULE) | 81 | #if defined(CONFIG_RTC_DRV_CMOS) || defined(CONFIG_RTC_DRV_CMOS_MODULE) |
74 | /* use /sys/class/rtc/rtcX/wakealarm instead; it's not ACPI-specific */ | 82 | /* use /sys/class/rtc/rtcX/wakealarm instead; it's not ACPI-specific */ |
@@ -463,7 +471,7 @@ static const struct file_operations acpi_system_wakeup_device_fops = { | |||
463 | .release = single_release, | 471 | .release = single_release, |
464 | }; | 472 | }; |
465 | 473 | ||
466 | #ifdef CONFIG_ACPI_SLEEP_PROC_SLEEP | 474 | #ifdef CONFIG_ACPI_PROCFS |
467 | static const struct file_operations acpi_system_sleep_fops = { | 475 | static const struct file_operations acpi_system_sleep_fops = { |
468 | .open = acpi_system_sleep_open_fs, | 476 | .open = acpi_system_sleep_open_fs, |
469 | .read = seq_read, | 477 | .read = seq_read, |
@@ -471,7 +479,7 @@ static const struct file_operations acpi_system_sleep_fops = { | |||
471 | .llseek = seq_lseek, | 479 | .llseek = seq_lseek, |
472 | .release = single_release, | 480 | .release = single_release, |
473 | }; | 481 | }; |
474 | #endif /* CONFIG_ACPI_SLEEP_PROC_SLEEP */ | 482 | #endif /* CONFIG_ACPI_PROCFS */ |
475 | 483 | ||
476 | #ifdef HAVE_ACPI_LEGACY_ALARM | 484 | #ifdef HAVE_ACPI_LEGACY_ALARM |
477 | static const struct file_operations acpi_system_alarm_fops = { | 485 | static const struct file_operations acpi_system_alarm_fops = { |
@@ -498,14 +506,14 @@ static int __init acpi_sleep_proc_init(void) | |||
498 | if (acpi_disabled) | 506 | if (acpi_disabled) |
499 | return 0; | 507 | return 0; |
500 | 508 | ||
501 | #ifdef CONFIG_ACPI_SLEEP_PROC_SLEEP | 509 | #ifdef CONFIG_ACPI_PROCFS |
502 | /* 'sleep' [R/W] */ | 510 | /* 'sleep' [R/W] */ |
503 | entry = | 511 | entry = |
504 | create_proc_entry("sleep", S_IFREG | S_IRUGO | S_IWUSR, | 512 | create_proc_entry("sleep", S_IFREG | S_IRUGO | S_IWUSR, |
505 | acpi_root_dir); | 513 | acpi_root_dir); |
506 | if (entry) | 514 | if (entry) |
507 | entry->proc_fops = &acpi_system_sleep_fops; | 515 | entry->proc_fops = &acpi_system_sleep_fops; |
508 | #endif | 516 | #endif /* CONFIG_ACPI_PROCFS */ |
509 | 517 | ||
510 | #ifdef HAVE_ACPI_LEGACY_ALARM | 518 | #ifdef HAVE_ACPI_LEGACY_ALARM |
511 | /* 'alarm' [R/W] */ | 519 | /* 'alarm' [R/W] */ |
diff --git a/drivers/acpi/sleep/wakeup.c b/drivers/acpi/sleep/wakeup.c index fab8f2694f03..97c27ddb144d 100644 --- a/drivers/acpi/sleep/wakeup.c +++ b/drivers/acpi/sleep/wakeup.c | |||
@@ -17,7 +17,6 @@ ACPI_MODULE_NAME("wakeup_devices") | |||
17 | extern struct list_head acpi_wakeup_device_list; | 17 | extern struct list_head acpi_wakeup_device_list; |
18 | extern spinlock_t acpi_device_lock; | 18 | extern spinlock_t acpi_device_lock; |
19 | 19 | ||
20 | #ifdef CONFIG_ACPI_SLEEP | ||
21 | /** | 20 | /** |
22 | * acpi_enable_wakeup_device_prep - prepare wakeup devices | 21 | * acpi_enable_wakeup_device_prep - prepare wakeup devices |
23 | * @sleep_state: ACPI state | 22 | * @sleep_state: ACPI state |
@@ -180,7 +179,6 @@ static int __init acpi_wakeup_device_init(void) | |||
180 | } | 179 | } |
181 | 180 | ||
182 | late_initcall(acpi_wakeup_device_init); | 181 | late_initcall(acpi_wakeup_device_init); |
183 | #endif | ||
184 | 182 | ||
185 | /* | 183 | /* |
186 | * Disable all wakeup GPEs before entering requested sleep state. | 184 | * Disable all wakeup GPEs before entering requested sleep state. |