git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
drivers
/
acpi
/
event.c
diff --git
a/drivers/acpi/event.c
b/drivers/acpi/event.c
index
2dbb1b0
..
959a893
100644
(file)
--- a/
drivers/acpi/event.c
+++ b/
drivers/acpi/event.c
@@
-48,18
+48,17
@@
acpi_system_read_event(struct file *file, char __user * buffer, size_t count,
static int chars_remaining = 0;
static char *ptr;
static int chars_remaining = 0;
static char *ptr;
- ACPI_FUNCTION_TRACE("acpi_system_read_event");
if (!chars_remaining) {
memset(&event, 0, sizeof(struct acpi_bus_event));
if ((file->f_flags & O_NONBLOCK)
&& (list_empty(&acpi_bus_event_list)))
if (!chars_remaining) {
memset(&event, 0, sizeof(struct acpi_bus_event));
if ((file->f_flags & O_NONBLOCK)
&& (list_empty(&acpi_bus_event_list)))
- return
_VALUE(-EAGAIN)
;
+ return
-EAGAIN
;
result = acpi_bus_receive_event(&event);
if (result)
result = acpi_bus_receive_event(&event);
if (result)
- return
_VALUE(result)
;
+ return
result
;
chars_remaining = sprintf(str, "%s %s %08x %08x\n",
event.device_class ? event.
chars_remaining = sprintf(str, "%s %s %08x %08x\n",
event.device_class ? event.
@@
-75,13
+74,13
@@
acpi_system_read_event(struct file *file, char __user * buffer, size_t count,
}
if (copy_to_user(buffer, ptr, count))
}
if (copy_to_user(buffer, ptr, count))
- return
_VALUE(-EFAULT)
;
+ return
-EFAULT
;
*ppos += count;
chars_remaining -= count;
ptr += count;
*ppos += count;
chars_remaining -= count;
ptr += count;
- return
_VALUE(count)
;
+ return
count
;
}
static int acpi_system_close_event(struct inode *inode, struct file *file)
}
static int acpi_system_close_event(struct inode *inode, struct file *file)
@@
-100,7
+99,7
@@
static unsigned int acpi_system_poll_event(struct file *file, poll_table * wait)
return 0;
}
return 0;
}
-static struct file_operations acpi_system_event_ops = {
+static
const
struct file_operations acpi_system_event_ops = {
.open = acpi_system_open_event,
.read = acpi_system_read_event,
.release = acpi_system_close_event,
.open = acpi_system_open_event,
.read = acpi_system_read_event,
.release = acpi_system_close_event,
@@
-112,22
+111,18
@@
static int __init acpi_event_init(void)
struct proc_dir_entry *entry;
int error = 0;
struct proc_dir_entry *entry;
int error = 0;
- ACPI_FUNCTION_TRACE("acpi_event_init");
if (acpi_disabled)
if (acpi_disabled)
- return
_VALUE(0)
;
+ return
0
;
/* 'event' [R] */
entry = create_proc_entry("event", S_IRUSR, acpi_root_dir);
if (entry)
entry->proc_fops = &acpi_system_event_ops;
else {
/* 'event' [R] */
entry = create_proc_entry("event", S_IRUSR, acpi_root_dir);
if (entry)
entry->proc_fops = &acpi_system_event_ops;
else {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
- "Unable to create '%s' proc fs entry\n",
- "event"));
- error = -EFAULT;
+ error = -ENODEV;
}
}
- return
_VALUE(error)
;
+ return
error
;
}
subsys_initcall(acpi_event_init);
}
subsys_initcall(acpi_event_init);