[lkml]   [2007]   [Feb]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH] input: extend EV_LED

Extend EV_LED handling code so that it can handle not
only two states (on/off) but also others. For example
a LED can blink using hardware acceleration. The code
changed so that it is similar to the code at EV_SND.

Signed-off-by: Márton Németh <>

diff -uprN linux-2.6.20.orig/drivers/input/input.c
--- linux-2.6.20.orig/drivers/input/input.c 2007-02-04
19:44:54.000000000 +0100
+++ linux/drivers/input/input.c 2007-02-10 15:20:28.000000000 +0100
@@ -141,10 +141,11 @@ void input_event(struct input_dev *dev,

case EV_LED:

- if (code > LED_MAX || !test_bit(code, dev->ledbit) ||
!!test_bit(code, dev->led) == value)
+ if (code > LED_MAX || !test_bit(code, dev->ledbit))

- change_bit(code, dev->led);
+ if (!!test_bit(code, dev->led) != !!value)
+ change_bit(code, dev->led);

if (dev->event)
dev->event(dev, type, code, value);
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at
 \ /
  Last update: 2007-02-11 11:21    [W:0.074 / U:1.368 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site