Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 4735
b: refs/heads/master
c: ebb6e1a
h: refs/heads/master
i:
  4733: 9bbf5d4
  4731: 1814a97
  4727: a1bf588
  4719: 5bdb45a
  4703: fbd2d0a
  4671: ec3c9fd
  4607: c5f1070
v: v3
  • Loading branch information
Len Brown committed Jul 12, 2005
1 parent 16bed3a commit 0dab57f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9d9437759eb6fdb68f7b82cbee20b0fb711d9f0d
refs/heads/master: ebb6e1a6122fd6b7c96470cfd4ce0f04150e5084
8 changes: 8 additions & 0 deletions trunk/drivers/acpi/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,14 @@ config ACPI_SLEEP_PROC_FS
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_AC
tristate "AC Adapter"
depends on X86
Expand Down
9 changes: 9 additions & 0 deletions trunk/drivers/acpi/sleep/proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,17 @@

#include "sleep.h"

#ifdef CONFIG_ACPI_SLEEP_PROC_SLEEP
#define ACPI_SYSTEM_FILE_SLEEP "sleep"
#endif

#define ACPI_SYSTEM_FILE_ALARM "alarm"
#define ACPI_SYSTEM_FILE_WAKEUP_DEVICE "wakeup"

#define _COMPONENT ACPI_SYSTEM_COMPONENT
ACPI_MODULE_NAME ("sleep")

#ifdef CONFIG_ACPI_SLEEP_PROC_SLEEP

static int acpi_system_sleep_seq_show(struct seq_file *seq, void *offset)
{
Expand Down Expand Up @@ -78,6 +82,7 @@ acpi_system_write_sleep (
Done:
return error ? error : count;
}
#endif /* CONFIG_ACPI_SLEEP_PROC_SLEEP */

static int acpi_system_alarm_seq_show(struct seq_file *seq, void *offset)
{
Expand Down Expand Up @@ -452,13 +457,15 @@ static struct file_operations acpi_system_wakeup_device_fops = {
.release = single_release,
};

#ifdef CONFIG_ACPI_SLEEP_PROC_SLEEP
static struct file_operations acpi_system_sleep_fops = {
.open = acpi_system_sleep_open_fs,
.read = seq_read,
.write = acpi_system_write_sleep,
.llseek = seq_lseek,
.release = single_release,
};
#endif /* CONFIG_ACPI_SLEEP_PROC_SLEEP */

static struct file_operations acpi_system_alarm_fops = {
.open = acpi_system_alarm_open_fs,
Expand All @@ -484,11 +491,13 @@ static int acpi_sleep_proc_init(void)
if (acpi_disabled)
return 0;

#ifdef CONFIG_ACPI_SLEEP_PROC_SLEEP
/* 'sleep' [R/W]*/
entry = create_proc_entry(ACPI_SYSTEM_FILE_SLEEP,
S_IFREG|S_IRUGO|S_IWUSR, acpi_root_dir);
if (entry)
entry->proc_fops = &acpi_system_sleep_fops;
#endif

/* 'alarm' [R/W] */
entry = create_proc_entry(ACPI_SYSTEM_FILE_ALARM,
Expand Down

0 comments on commit 0dab57f

Please sign in to comment.