X-Git-Url: http://ftp.safe.ca/?a=blobdiff_plain;ds=sidebyside;f=drivers%2Facpi%2Fevent.c;h=959a893c8d1fdbd45d415c4a8a50c954ac498050;hb=963497c12acb4d43caa9751b9291b014eea51a1a;hp=dab09d3f6307be4e5f38d734f3c10e77653b40a2;hpb=a6fc67202e0224e6c9d1d285cc0b444bce887ed5;p=safe%2Fjmp%2Flinux-2.6 diff --git a/drivers/acpi/event.c b/drivers/acpi/event.c index dab09d3..959a893 100644 --- 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; - 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))) - return_VALUE(-EAGAIN); + return -EAGAIN; 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. @@ -75,13 +74,13 @@ acpi_system_read_event(struct file *file, char __user * buffer, size_t count, } if (copy_to_user(buffer, ptr, count)) - return_VALUE(-EFAULT); + return -EFAULT; *ppos += count; chars_remaining -= count; ptr += count; - return_VALUE(count); + return count; } 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; } -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, @@ -112,10 +111,9 @@ static int __init acpi_event_init(void) struct proc_dir_entry *entry; int error = 0; - ACPI_FUNCTION_TRACE("acpi_event_init"); if (acpi_disabled) - return_VALUE(0); + return 0; /* 'event' [R] */ entry = create_proc_entry("event", S_IRUSR, acpi_root_dir); @@ -124,7 +122,7 @@ static int __init acpi_event_init(void) else { error = -ENODEV; } - return_VALUE(error); + return error; } subsys_initcall(acpi_event_init);