* [patch] Fix up macro abuse in drivers/acpi/sleep/proc.c
@ 2005-06-03 10:55 Pavel Machek
0 siblings, 0 replies; only message in thread
From: Pavel Machek @ 2005-06-03 10:55 UTC (permalink / raw)
To: Andrew Morton, ACPI mailing list, kernel list
Macros in proc.c make code both longer *and* less readable; I think
they should die.
Signed-off-by: Pavel Machek <pavel@suse.cz>
diff --git a/drivers/acpi/sleep/proc.c b/drivers/acpi/sleep/proc.c
--- a/drivers/acpi/sleep/proc.c
+++ b/drivers/acpi/sleep/proc.c
@@ -13,10 +13,6 @@
#include "sleep.h"
-#define ACPI_SYSTEM_FILE_SLEEP "sleep"
-#define ACPI_SYSTEM_FILE_ALARM "alarm"
-#define ACPI_SYSTEM_FILE_WAKEUP_DEVICE "wakeup"
-
#define _COMPONENT ACPI_SYSTEM_COMPONENT
ACPI_MODULE_NAME ("sleep")
@@ -479,26 +475,23 @@ static u32 rtc_handler(void * context)
static int acpi_sleep_proc_init(void)
{
- struct proc_dir_entry *entry = NULL;
+ struct proc_dir_entry *entry = NULL;
if (acpi_disabled)
return 0;
- /* 'sleep' [R/W]*/
- entry = create_proc_entry(ACPI_SYSTEM_FILE_SLEEP,
- S_IFREG|S_IRUGO|S_IWUSR, acpi_root_dir);
+ /* '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;
/* 'alarm' [R/W] */
- entry = create_proc_entry(ACPI_SYSTEM_FILE_ALARM,
- S_IFREG|S_IRUGO|S_IWUSR, acpi_root_dir);
+ entry = create_proc_entry("alarm", S_IFREG|S_IRUGO|S_IWUSR, acpi_root_dir);
if (entry)
entry->proc_fops = &acpi_system_alarm_fops;
- /* 'wakeup device' [R/W]*/
- entry = create_proc_entry(ACPI_SYSTEM_FILE_WAKEUP_DEVICE,
- S_IFREG|S_IRUGO|S_IWUSR, acpi_root_dir);
+ /* 'wakeup device' [R/W] */
+ entry = create_proc_entry("wakeup", S_IFREG|S_IRUGO|S_IWUSR, acpi_root_dir);
if (entry)
entry->proc_fops = &acpi_system_wakeup_device_fops;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-06-03 10:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-03 10:55 [patch] Fix up macro abuse in drivers/acpi/sleep/proc.c Pavel Machek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox