lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <45CEE9AB.2020208@freemail.hu>
Date:	Sun, 11 Feb 2007 11:02:19 +0100
From:	Németh Márton <nm127@...email.hu>
To:	Dmitry Torokhov <dmitry.torokhov@...il.com>
CC:	linux-input@...ey.karlin.mff.cuni.cz, linux-kernel@...r.kernel.org
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 <nm127@...email.hu>

---
diff -uprN linux-2.6.20.orig/drivers/input/input.c 
linux/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))
  				return;

-			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 majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ