aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/sleep/proc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/sleep/proc.c')
-rw-r--r--drivers/acpi/sleep/proc.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/acpi/sleep/proc.c b/drivers/acpi/sleep/proc.c
index fd7c5a0649af..1be99f0996d6 100644
--- a/drivers/acpi/sleep/proc.c
+++ b/drivers/acpi/sleep/proc.c
@@ -13,13 +13,17 @@
13 13
14#include "sleep.h" 14#include "sleep.h"
15 15
16#ifdef CONFIG_ACPI_SLEEP_PROC_SLEEP
16#define ACPI_SYSTEM_FILE_SLEEP "sleep" 17#define ACPI_SYSTEM_FILE_SLEEP "sleep"
18#endif
19
17#define ACPI_SYSTEM_FILE_ALARM "alarm" 20#define ACPI_SYSTEM_FILE_ALARM "alarm"
18#define ACPI_SYSTEM_FILE_WAKEUP_DEVICE "wakeup" 21#define ACPI_SYSTEM_FILE_WAKEUP_DEVICE "wakeup"
19 22
20#define _COMPONENT ACPI_SYSTEM_COMPONENT 23#define _COMPONENT ACPI_SYSTEM_COMPONENT
21ACPI_MODULE_NAME ("sleep") 24ACPI_MODULE_NAME ("sleep")
22 25
26#ifdef CONFIG_ACPI_SLEEP_PROC_SLEEP
23 27
24static int acpi_system_sleep_seq_show(struct seq_file *seq, void *offset) 28static int acpi_system_sleep_seq_show(struct seq_file *seq, void *offset)
25{ 29{
@@ -78,6 +82,7 @@ acpi_system_write_sleep (
78 Done: 82 Done:
79 return error ? error : count; 83 return error ? error : count;
80} 84}
85#endif /* CONFIG_ACPI_SLEEP_PROC_SLEEP */
81 86
82static int acpi_system_alarm_seq_show(struct seq_file *seq, void *offset) 87static int acpi_system_alarm_seq_show(struct seq_file *seq, void *offset)
83{ 88{
@@ -452,6 +457,7 @@ static struct file_operations acpi_system_wakeup_device_fops = {
452 .release = single_release, 457 .release = single_release,
453}; 458};
454 459
460#ifdef CONFIG_ACPI_SLEEP_PROC_SLEEP
455static struct file_operations acpi_system_sleep_fops = { 461static struct file_operations acpi_system_sleep_fops = {
456 .open = acpi_system_sleep_open_fs, 462 .open = acpi_system_sleep_open_fs,
457 .read = seq_read, 463 .read = seq_read,
@@ -459,6 +465,7 @@ static struct file_operations acpi_system_sleep_fops = {
459 .llseek = seq_lseek, 465 .llseek = seq_lseek,
460 .release = single_release, 466 .release = single_release,
461}; 467};
468#endif /* CONFIG_ACPI_SLEEP_PROC_SLEEP */
462 469
463static struct file_operations acpi_system_alarm_fops = { 470static struct file_operations acpi_system_alarm_fops = {
464 .open = acpi_system_alarm_open_fs, 471 .open = acpi_system_alarm_open_fs,
@@ -484,11 +491,13 @@ static int acpi_sleep_proc_init(void)
484 if (acpi_disabled) 491 if (acpi_disabled)
485 return 0; 492 return 0;
486 493
494#ifdef CONFIG_ACPI_SLEEP_PROC_SLEEP
487 /* 'sleep' [R/W]*/ 495 /* 'sleep' [R/W]*/
488 entry = create_proc_entry(ACPI_SYSTEM_FILE_SLEEP, 496 entry = create_proc_entry(ACPI_SYSTEM_FILE_SLEEP,
489 S_IFREG|S_IRUGO|S_IWUSR, acpi_root_dir); 497 S_IFREG|S_IRUGO|S_IWUSR, acpi_root_dir);
490 if (entry) 498 if (entry)
491 entry->proc_fops = &acpi_system_sleep_fops; 499 entry->proc_fops = &acpi_system_sleep_fops;
500#endif
492 501
493 /* 'alarm' [R/W] */ 502 /* 'alarm' [R/W] */
494 entry = create_proc_entry(ACPI_SYSTEM_FILE_ALARM, 503 entry = create_proc_entry(ACPI_SYSTEM_FILE_ALARM,