* [PATCH] ACPI: Remove code related to dead ACPI_PROCFS_SLEEP config variable.
@ 2007-08-31 12:15 Robert P. J. Day
2007-08-31 20:36 ` Len Brown
0 siblings, 1 reply; 3+ messages in thread
From: Robert P. J. Day @ 2007-08-31 12:15 UTC (permalink / raw)
To: linux-acpi; +Cc: len.brown
Given that the ACPI_PROCFS_SLEEP config variable was deleted in commit
128a2bcf9dddeb8e79a4ba55bf191533f70f39ce, there seems to be little
point in retaining this code.
Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
---
of course, if this is already gone in the ACPI tree, ignore it. not
compile-tested as it seemed fairly obvious.
diff --git a/drivers/acpi/sleep/proc.c b/drivers/acpi/sleep/proc.c
index 66b62b0..a777976 100644
--- a/drivers/acpi/sleep/proc.c
+++ b/drivers/acpi/sleep/proc.c
@@ -23,60 +23,6 @@
*/
ACPI_MODULE_NAME("sleep")
-#ifdef CONFIG_ACPI_PROCFS_SLEEP
-static int acpi_system_sleep_seq_show(struct seq_file *seq, void *offset)
-{
- int i;
-
- ACPI_FUNCTION_TRACE("acpi_system_sleep_seq_show");
-
- for (i = 0; i <= ACPI_STATE_S5; i++) {
- if (sleep_states[i]) {
- seq_printf(seq, "S%d ", i);
- }
- }
-
- seq_puts(seq, "\n");
-
- return 0;
-}
-
-static int acpi_system_sleep_open_fs(struct inode *inode, struct file *file)
-{
- return single_open(file, acpi_system_sleep_seq_show, PDE(inode)->data);
-}
-
-static ssize_t
-acpi_system_write_sleep(struct file *file,
- const char __user * buffer, size_t count, loff_t * ppos)
-{
- char str[12];
- u32 state = 0;
- int error = 0;
-
- if (count > sizeof(str) - 1)
- goto Done;
- memset(str, 0, sizeof(str));
- if (copy_from_user(str, buffer, count))
- return -EFAULT;
-
- /* Check for S4 bios request */
- if (!strcmp(str, "4b")) {
- error = acpi_suspend(4);
- goto Done;
- }
- state = simple_strtoul(str, NULL, 0);
-#ifdef CONFIG_HIBERNATION
- if (state == 4) {
- error = hibernate();
- goto Done;
- }
-#endif
- error = acpi_suspend(state);
- Done:
- return error ? error : count;
-}
-#endif /* CONFIG_ACPI_PROCFS_SLEEP */
#if defined(CONFIG_RTC_DRV_CMOS) || defined(CONFIG_RTC_DRV_CMOS_MODULE) || !defined(CONFIG_X86)
/* use /sys/class/rtc/rtcX/wakealarm instead; it's not ACPI-specific */
@@ -471,16 +417,6 @@ static const struct file_operations acpi_system_wakeup_device_fops = {
.release = single_release,
};
-#ifdef CONFIG_ACPI_PROCFS_SLEEP
-static const 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_PROCFS_SLEEP */
-
#ifdef HAVE_ACPI_LEGACY_ALARM
static const struct file_operations acpi_system_alarm_fops = {
.open = acpi_system_alarm_open_fs,
@@ -506,15 +442,6 @@ static int __init acpi_sleep_proc_init(void)
if (acpi_disabled)
return 0;
-#ifdef CONFIG_ACPI_PROCFS_SLEEP
- /* 'sleep' [R/W] */
- entry =
- create_proc_entry("sleep", S_IFREG | S_IRUGO | S_IWUSR,
- acpi_root_dir);
- if (entry)
- entry->proc_fops = &acpi_system_sleep_fops;
-#endif /* CONFIG_ACPI_PROCFS */
-
#ifdef HAVE_ACPI_LEGACY_ALARM
/* 'alarm' [R/W] */
entry =
--
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA
http://crashcourse.ca
========================================================================
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] ACPI: Remove code related to dead ACPI_PROCFS_SLEEP config variable.
2007-08-31 12:15 [PATCH] ACPI: Remove code related to dead ACPI_PROCFS_SLEEP config variable Robert P. J. Day
@ 2007-08-31 20:36 ` Len Brown
2007-08-31 21:03 ` Robert P. J. Day
0 siblings, 1 reply; 3+ messages in thread
From: Len Brown @ 2007-08-31 20:36 UTC (permalink / raw)
To: Robert P. J. Day; +Cc: linux-acpi
Good eye,
but actually, the real fix is in the queue already, as below.
thanks,
-Len
commit 134c21715ac3cb36db13c8d362cc80ccc87ee48d
Author: Christian Borntraeger <borntraeger@de.ibm.com>
Date: Tue Aug 28 14:58:56 2007 -0400
ACPI: (more) delete CONFIG_ACPI_PROCFS_SLEEP (again)
Commit 2bcf9dddeb8e79a4ba55bf191533f70f39ce
('ACPI: delete CONFIG_ACPI_PROCFS_SLEEP (again)')
was incomplete.
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Len Brown <len.brown@intel.com>
diff --git a/drivers/acpi/sleep/proc.c b/drivers/acpi/sleep/proc.c
index 66b62b0..3839efd 100644
--- a/drivers/acpi/sleep/proc.c
+++ b/drivers/acpi/sleep/proc.c
@@ -23,7 +23,7 @@
*/
ACPI_MODULE_NAME("sleep")
-#ifdef CONFIG_ACPI_PROCFS_SLEEP
+#ifdef CONFIG_ACPI_PROCFS
static int acpi_system_sleep_seq_show(struct seq_file *seq, void *offset)
{
int i;
@@ -76,7 +76,7 @@ acpi_system_write_sleep(struct file *file,
Done:
return error ? error : count;
}
-#endif /* CONFIG_ACPI_PROCFS_SLEEP */
+#endif /* CONFIG_ACPI_PROCFS */
#if defined(CONFIG_RTC_DRV_CMOS) || defined(CONFIG_RTC_DRV_CMOS_MODULE) || !defined(CONFIG_X86)
/* use /sys/class/rtc/rtcX/wakealarm instead; it's not ACPI-specific */
@@ -471,7 +471,7 @@ static const struct file_operations acpi_system_wakeup_device_fops = {
.release = single_release,
};
-#ifdef CONFIG_ACPI_PROCFS_SLEEP
+#ifdef CONFIG_ACPI_PROCFS
static const struct file_operations acpi_system_sleep_fops = {
.open = acpi_system_sleep_open_fs,
.read = seq_read,
@@ -479,7 +479,7 @@ static const struct file_operations acpi_system_sleep_fops = {
.llseek = seq_lseek,
.release = single_release,
};
-#endif /* CONFIG_ACPI_PROCFS_SLEEP */
+#endif /* CONFIG_ACPI_PROCFS */
#ifdef HAVE_ACPI_LEGACY_ALARM
static const struct file_operations acpi_system_alarm_fops = {
@@ -506,7 +506,7 @@ static int __init acpi_sleep_proc_init(void)
if (acpi_disabled)
return 0;
-#ifdef CONFIG_ACPI_PROCFS_SLEEP
+#ifdef CONFIG_ACPI_PROCFS
/* 'sleep' [R/W] */
entry =
create_proc_entry("sleep", S_IFREG | S_IRUGO | S_IWUSR,
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] ACPI: Remove code related to dead ACPI_PROCFS_SLEEP config variable.
2007-08-31 20:36 ` Len Brown
@ 2007-08-31 21:03 ` Robert P. J. Day
0 siblings, 0 replies; 3+ messages in thread
From: Robert P. J. Day @ 2007-08-31 21:03 UTC (permalink / raw)
To: Len Brown; +Cc: linux-acpi
On Fri, 31 Aug 2007, Len Brown wrote:
> Good eye,
> but actually, the real fix is in the queue already, as below.
well, fine ... *be* like that. :-)
rday
--
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA
http://crashcourse.ca
========================================================================
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-08-31 21:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-31 12:15 [PATCH] ACPI: Remove code related to dead ACPI_PROCFS_SLEEP config variable Robert P. J. Day
2007-08-31 20:36 ` Len Brown
2007-08-31 21:03 ` Robert P. J. Day
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox