diff options
Diffstat (limited to 'drivers/acpi/event.c')
-rw-r--r-- | drivers/acpi/event.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/acpi/event.c b/drivers/acpi/event.c index b7b143288c22..cf6d5161cf31 100644 --- a/drivers/acpi/event.c +++ b/drivers/acpi/event.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #define _COMPONENT ACPI_SYSTEM_COMPONENT | 17 | #define _COMPONENT ACPI_SYSTEM_COMPONENT |
18 | ACPI_MODULE_NAME("event"); | 18 | ACPI_MODULE_NAME("event"); |
19 | 19 | ||
20 | #ifdef CONFIG_ACPI_PROC_EVENT | ||
20 | /* Global vars for handling event proc entry */ | 21 | /* Global vars for handling event proc entry */ |
21 | static DEFINE_SPINLOCK(acpi_system_event_lock); | 22 | static DEFINE_SPINLOCK(acpi_system_event_lock); |
22 | int event_is_open = 0; | 23 | int event_is_open = 0; |
@@ -106,6 +107,7 @@ static const struct file_operations acpi_system_event_ops = { | |||
106 | .release = acpi_system_close_event, | 107 | .release = acpi_system_close_event, |
107 | .poll = acpi_system_poll_event, | 108 | .poll = acpi_system_poll_event, |
108 | }; | 109 | }; |
110 | #endif /* CONFIG_ACPI_PROC_EVENT */ | ||
109 | 111 | ||
110 | #ifdef CONFIG_NET | 112 | #ifdef CONFIG_NET |
111 | static unsigned int acpi_event_seqnum; | 113 | static unsigned int acpi_event_seqnum; |
@@ -247,7 +249,9 @@ static int acpi_event_genetlink_init(void) | |||
247 | 249 | ||
248 | static int __init acpi_event_init(void) | 250 | static int __init acpi_event_init(void) |
249 | { | 251 | { |
252 | #ifdef CONFIG_ACPI_PROC_EVENT | ||
250 | struct proc_dir_entry *entry; | 253 | struct proc_dir_entry *entry; |
254 | #endif | ||
251 | int error = 0; | 255 | int error = 0; |
252 | 256 | ||
253 | if (acpi_disabled) | 257 | if (acpi_disabled) |
@@ -259,12 +263,14 @@ static int __init acpi_event_init(void) | |||
259 | printk(KERN_WARNING PREFIX | 263 | printk(KERN_WARNING PREFIX |
260 | "Failed to create genetlink family for ACPI event\n"); | 264 | "Failed to create genetlink family for ACPI event\n"); |
261 | 265 | ||
266 | #ifdef CONFIG_ACPI_PROC_EVENT | ||
262 | /* 'event' [R] */ | 267 | /* 'event' [R] */ |
263 | entry = create_proc_entry("event", S_IRUSR, acpi_root_dir); | 268 | entry = create_proc_entry("event", S_IRUSR, acpi_root_dir); |
264 | if (entry) | 269 | if (entry) |
265 | entry->proc_fops = &acpi_system_event_ops; | 270 | entry->proc_fops = &acpi_system_event_ops; |
266 | else | 271 | else |
267 | return -ENODEV; | 272 | return -ENODEV; |
273 | #endif | ||
268 | 274 | ||
269 | return 0; | 275 | return 0; |
270 | } | 276 | } |