input_handle_event() used to pass EV_PWR events to event handlers but no
longer does so in 2.6.23. Modules to trigger power management events
based on input power events exist but rely on the EV_PWR events being
passed to the input event handlers. This patch makes these events
available again.

Signed-off-by: Richard Purdie <[EMAIL PROTECTED]>
        
Index: kernel-hacking/drivers/input/input.c
===================================================================
--- kernel-hacking.orig/drivers/input/input.c   2008-01-01 23:50:13.000000000 
+0000
+++ kernel-hacking/drivers/input/input.c        2008-01-01 23:50:26.000000000 
+0000
@@ -235,6 +235,10 @@ static void input_handle_event(struct in
                if (value >= 0)
                        disposition = INPUT_PASS_TO_ALL;
                break;
+
+       case EV_PWR:
+               disposition = INPUT_PASS_TO_ALL;
+               break;
        }
 
        if (type != EV_SYN)

Reply via email to