[PATCH] Fix /proc/acpi/events around suspend
authorPavel Machek <pavel@ucw.cz>
Mon, 17 Oct 2005 23:43:31 +0000 (16:43 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Tue, 18 Oct 2005 00:03:57 +0000 (17:03 -0700)
Fix -EIO on /proc/acpi/events after suspends.  This actually breaks
suspending by power button in many setups.

Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/acpi/event.c

index bfa8b76..2dbb1b0 100644 (file)
@@ -58,9 +58,8 @@ acpi_system_read_event(struct file *file, char __user * buffer, size_t count,
                        return_VALUE(-EAGAIN);
 
                result = acpi_bus_receive_event(&event);
-               if (result) {
-                       return_VALUE(-EIO);
-               }
+               if (result)
+                       return_VALUE(result);
 
                chars_remaining = sprintf(str, "%s %s %08x %08x\n",
                                          event.device_class ? event.