diff options
author | Len Brown <len.brown@intel.com> | 2005-04-14 23:12:56 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2005-07-12 00:05:03 -0400 |
commit | ebb6e1a6122fd6b7c96470cfd4ce0f04150e5084 (patch) | |
tree | b0f0630d539caaf53c20fbda3c962886a0dda1f5 /drivers | |
parent | 9d9437759eb6fdb68f7b82cbee20b0fb711d9f0d (diff) |
[ACPI] Deprecate /proc/acpi/sleep in favor of /sys/power/state
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/acpi/Kconfig | 8 | ||||
-rw-r--r-- | drivers/acpi/sleep/proc.c | 9 |
2 files changed, 17 insertions, 0 deletions
diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig index fa7f43451891..8b6de1462558 100644 --- a/drivers/acpi/Kconfig +++ b/drivers/acpi/Kconfig | |||
@@ -80,6 +80,14 @@ config ACPI_SLEEP_PROC_FS | |||
80 | depends on ACPI_SLEEP && PROC_FS | 80 | depends on ACPI_SLEEP && PROC_FS |
81 | default y | 81 | default y |
82 | 82 | ||
83 | config ACPI_SLEEP_PROC_SLEEP | ||
84 | bool "/proc/acpi/sleep (deprecated)" | ||
85 | depends on ACPI_SLEEP_PROC_FS | ||
86 | default n | ||
87 | ---help--- | ||
88 | Create /proc/acpi/sleep | ||
89 | Deprecated by /sys/power/state | ||
90 | |||
83 | config ACPI_AC | 91 | config ACPI_AC |
84 | tristate "AC Adapter" | 92 | tristate "AC Adapter" |
85 | depends on X86 | 93 | depends on X86 |
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 |
21 | ACPI_MODULE_NAME ("sleep") | 24 | ACPI_MODULE_NAME ("sleep") |
22 | 25 | ||
26 | #ifdef CONFIG_ACPI_SLEEP_PROC_SLEEP | ||
23 | 27 | ||
24 | static int acpi_system_sleep_seq_show(struct seq_file *seq, void *offset) | 28 | static 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 | ||
82 | static int acpi_system_alarm_seq_show(struct seq_file *seq, void *offset) | 87 | static 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 | ||
455 | static struct file_operations acpi_system_sleep_fops = { | 461 | static 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 | ||
463 | static struct file_operations acpi_system_alarm_fops = { | 470 | static 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, |