Commit 43532c8a authored by Len Brown's avatar Len Brown

ACPI: Kconfig: fold /proc/acpi/sleep under CONFIG_ACPI_PROCFS

/proc/acpi/sleep has had its own "default n" option,
ACPI_SLEEP_PROC_SLEEP, for many months.
Time to delete ACPI_SLEEP_PROC_SLEEP.

Users that still need /proc/acpi/sleep can still get it
along with the other deprecated /proc/acpi files
by enabling CONFIG_ACPI_PROCFS.

Also delete ACPI_SLEEP_PROC_FS, which was an umbrella
for /proc/acpi/sleep, wakeup, alarm, because it was
effectively just a synonym for ACPI_SLEEP.
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent fb804714
...@@ -62,19 +62,6 @@ config ACPI_SLEEP ...@@ -62,19 +62,6 @@ config ACPI_SLEEP
This option is not recommended for anyone except those doing driver This option is not recommended for anyone except those doing driver
power management development. power management development.
config ACPI_SLEEP_PROC_FS
bool
depends on ACPI_SLEEP && PROC_FS
default y
config ACPI_SLEEP_PROC_SLEEP
bool "/proc/acpi/sleep (deprecated)"
depends on ACPI_SLEEP_PROC_FS
default n
---help---
Create /proc/acpi/sleep
Deprecated by /sys/power/state
config ACPI_PROCFS config ACPI_PROCFS
bool "Deprecated /proc/acpi files" bool "Deprecated /proc/acpi files"
depends on PROC_FS depends on PROC_FS
...@@ -84,6 +71,7 @@ config ACPI_PROCFS ...@@ -84,6 +71,7 @@ config ACPI_PROCFS
they have been replaced by functions in /sys. they have been replaced by functions in /sys.
The deprecated files (and their replacements) include: The deprecated files (and their replacements) include:
/proc/acpi/sleep (/sys/power/state)
/proc/acpi/info (/sys/modules/acpi/parameters/acpica_version) /proc/acpi/info (/sys/modules/acpi/parameters/acpica_version)
/proc/acpi/dsdt (/sys/firmware/acpi/tables/DSDT) /proc/acpi/dsdt (/sys/firmware/acpi/tables/DSDT)
/proc/acpi/fadt (/sys/firmware/acpi/tables/FACP) /proc/acpi/fadt (/sys/firmware/acpi/tables/FACP)
......
obj-y := poweroff.o wakeup.o obj-y := poweroff.o wakeup.o
obj-$(CONFIG_ACPI_SLEEP) += main.o obj-$(CONFIG_ACPI_SLEEP) += main.o
obj-$(CONFIG_ACPI_SLEEP_PROC_FS) += proc.o obj-$(CONFIG_ACPI_SLEEP) += proc.o
EXTRA_CFLAGS += $(ACPI_CFLAGS) EXTRA_CFLAGS += $(ACPI_CFLAGS)
...@@ -14,8 +14,16 @@ ...@@ -14,8 +14,16 @@
#include "sleep.h" #include "sleep.h"
#define _COMPONENT ACPI_SYSTEM_COMPONENT #define _COMPONENT ACPI_SYSTEM_COMPONENT
/*
* this file provides support for:
* /proc/acpi/sleep
* /proc/acpi/alarm
* /proc/acpi/wakeup
*/
ACPI_MODULE_NAME("sleep") ACPI_MODULE_NAME("sleep")
#ifdef CONFIG_ACPI_SLEEP_PROC_SLEEP #ifdef CONFIG_ACPI_PROCFS
static int acpi_system_sleep_seq_show(struct seq_file *seq, void *offset) static int acpi_system_sleep_seq_show(struct seq_file *seq, void *offset)
{ {
int i; int i;
...@@ -68,7 +76,7 @@ acpi_system_write_sleep(struct file *file, ...@@ -68,7 +76,7 @@ acpi_system_write_sleep(struct file *file,
Done: Done:
return error ? error : count; return error ? error : count;
} }
#endif /* CONFIG_ACPI_SLEEP_PROC_SLEEP */ #endif /* CONFIG_ACPI_PROCFS */
#if defined(CONFIG_RTC_DRV_CMOS) || defined(CONFIG_RTC_DRV_CMOS_MODULE) #if defined(CONFIG_RTC_DRV_CMOS) || defined(CONFIG_RTC_DRV_CMOS_MODULE)
/* use /sys/class/rtc/rtcX/wakealarm instead; it's not ACPI-specific */ /* 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,7 +471,7 @@ static const struct file_operations acpi_system_wakeup_device_fops = {
.release = single_release, .release = single_release,
}; };
#ifdef CONFIG_ACPI_SLEEP_PROC_SLEEP #ifdef CONFIG_ACPI_PROCFS
static const struct file_operations acpi_system_sleep_fops = { static const struct file_operations acpi_system_sleep_fops = {
.open = acpi_system_sleep_open_fs, .open = acpi_system_sleep_open_fs,
.read = seq_read, .read = seq_read,
...@@ -471,7 +479,7 @@ static const struct file_operations acpi_system_sleep_fops = { ...@@ -471,7 +479,7 @@ static const struct file_operations acpi_system_sleep_fops = {
.llseek = seq_lseek, .llseek = seq_lseek,
.release = single_release, .release = single_release,
}; };
#endif /* CONFIG_ACPI_SLEEP_PROC_SLEEP */ #endif /* CONFIG_ACPI_PROCFS */
#ifdef HAVE_ACPI_LEGACY_ALARM #ifdef HAVE_ACPI_LEGACY_ALARM
static const struct file_operations acpi_system_alarm_fops = { static const struct file_operations acpi_system_alarm_fops = {
...@@ -498,14 +506,14 @@ static int __init acpi_sleep_proc_init(void) ...@@ -498,14 +506,14 @@ static int __init acpi_sleep_proc_init(void)
if (acpi_disabled) if (acpi_disabled)
return 0; return 0;
#ifdef CONFIG_ACPI_SLEEP_PROC_SLEEP #ifdef CONFIG_ACPI_PROCFS
/* 'sleep' [R/W] */ /* 'sleep' [R/W] */
entry = entry =
create_proc_entry("sleep", S_IFREG | S_IRUGO | S_IWUSR, create_proc_entry("sleep", S_IFREG | S_IRUGO | S_IWUSR,
acpi_root_dir); acpi_root_dir);
if (entry) if (entry)
entry->proc_fops = &acpi_system_sleep_fops; entry->proc_fops = &acpi_system_sleep_fops;
#endif #endif /* CONFIG_ACPI_PROCFS */
#ifdef HAVE_ACPI_LEGACY_ALARM #ifdef HAVE_ACPI_LEGACY_ALARM
/* 'alarm' [R/W] */ /* 'alarm' [R/W] */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment