aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/proc.c
diff options
context:
space:
mode:
authorZhang Rui <rui.zhang@intel.com>2010-07-14 22:46:33 -0400
committerLen Brown <len.brown@intel.com>2010-08-15 00:27:51 -0400
commit47f5c892b06797336a34f1096b4b617623aa1960 (patch)
tree31613e2031b8b5ac40b48dc5f8d673c8dbe5ead6 /drivers/acpi/proc.c
parent1c8fce27e275fd7c6b75bc6455745f02d3903ee6 (diff)
ACPI: remove deprecated ACPI procfs I/F
Rmove deprecated ACPI procfs I/F, including /proc/acpi/debug_layer /proc/acpi/debug_level /proc/acpi/info /proc/acpi/dsdt /proc/acpi/fadt /proc/acpi/sleep because the sysfs I/F is already available and has been working well for years. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/proc.c')
-rw-r--r--drivers/acpi/proc.c70
1 files changed, 0 insertions, 70 deletions
diff --git a/drivers/acpi/proc.c b/drivers/acpi/proc.c
index 1ac678d2c51c..afad67769db6 100644
--- a/drivers/acpi/proc.c
+++ b/drivers/acpi/proc.c
@@ -17,64 +17,11 @@
17 17
18/* 18/*
19 * this file provides support for: 19 * this file provides support for:
20 * /proc/acpi/sleep
21 * /proc/acpi/alarm 20 * /proc/acpi/alarm
22 * /proc/acpi/wakeup 21 * /proc/acpi/wakeup
23 */ 22 */
24 23
25ACPI_MODULE_NAME("sleep") 24ACPI_MODULE_NAME("sleep")
26#ifdef CONFIG_ACPI_PROCFS
27static int acpi_system_sleep_seq_show(struct seq_file *seq, void *offset)
28{
29 int i;
30
31 for (i = 0; i <= ACPI_STATE_S5; i++) {
32 if (sleep_states[i]) {
33 seq_printf(seq, "S%d ", i);
34 }
35 }
36
37 seq_puts(seq, "\n");
38
39 return 0;
40}
41
42static int acpi_system_sleep_open_fs(struct inode *inode, struct file *file)
43{
44 return single_open(file, acpi_system_sleep_seq_show, PDE(inode)->data);
45}
46
47static ssize_t
48acpi_system_write_sleep(struct file *file,
49 const char __user * buffer, size_t count, loff_t * ppos)
50{
51 char str[12];
52 u32 state = 0;
53 int error = 0;
54
55 if (count > sizeof(str) - 1)
56 goto Done;
57 memset(str, 0, sizeof(str));
58 if (copy_from_user(str, buffer, count))
59 return -EFAULT;
60
61 /* Check for S4 bios request */
62 if (!strcmp(str, "4b")) {
63 error = acpi_suspend(4);
64 goto Done;
65 }
66 state = simple_strtoul(str, NULL, 0);
67#ifdef CONFIG_HIBERNATION
68 if (state == 4) {
69 error = hibernate();
70 goto Done;
71 }
72#endif
73 error = acpi_suspend(state);
74 Done:
75 return error ? error : count;
76}
77#endif /* CONFIG_ACPI_PROCFS */
78 25
79#if defined(CONFIG_RTC_DRV_CMOS) || defined(CONFIG_RTC_DRV_CMOS_MODULE) || !defined(CONFIG_X86) 26#if defined(CONFIG_RTC_DRV_CMOS) || defined(CONFIG_RTC_DRV_CMOS_MODULE) || !defined(CONFIG_X86)
80/* use /sys/class/rtc/rtcX/wakealarm instead; it's not ACPI-specific */ 27/* use /sys/class/rtc/rtcX/wakealarm instead; it's not ACPI-specific */
@@ -463,17 +410,6 @@ static const struct file_operations acpi_system_wakeup_device_fops = {
463 .release = single_release, 410 .release = single_release,
464}; 411};
465 412
466#ifdef CONFIG_ACPI_PROCFS
467static const struct file_operations acpi_system_sleep_fops = {
468 .owner = THIS_MODULE,
469 .open = acpi_system_sleep_open_fs,
470 .read = seq_read,
471 .write = acpi_system_write_sleep,
472 .llseek = seq_lseek,
473 .release = single_release,
474};
475#endif /* CONFIG_ACPI_PROCFS */
476
477#ifdef HAVE_ACPI_LEGACY_ALARM 413#ifdef HAVE_ACPI_LEGACY_ALARM
478static const struct file_operations acpi_system_alarm_fops = { 414static const struct file_operations acpi_system_alarm_fops = {
479 .owner = THIS_MODULE, 415 .owner = THIS_MODULE,
@@ -495,12 +431,6 @@ static u32 rtc_handler(void *context)
495 431
496int __init acpi_sleep_proc_init(void) 432int __init acpi_sleep_proc_init(void)
497{ 433{
498#ifdef CONFIG_ACPI_PROCFS
499 /* 'sleep' [R/W] */
500 proc_create("sleep", S_IFREG | S_IRUGO | S_IWUSR,
501 acpi_root_dir, &acpi_system_sleep_fops);
502#endif /* CONFIG_ACPI_PROCFS */
503
504#ifdef HAVE_ACPI_LEGACY_ALARM 434#ifdef HAVE_ACPI_LEGACY_ALARM
505 /* 'alarm' [R/W] */ 435 /* 'alarm' [R/W] */
506 proc_create("alarm", S_IFREG | S_IRUGO | S_IWUSR, 436 proc_create("alarm", S_IFREG | S_IRUGO | S_IWUSR,