[PATCH 3/4] Ignore non-LED events in hid-input hidinput_event().

Vojtech Pavlik
2005-02-02T20:19:05Z

ChangeSet@1.1977.1.3, 2005-01-29 13:09:24+01:00, vojtech@silver.ucw.cz
input: Ignore non-LED events in hid-input hidinput_event(). This gets rid
of the "event field not found" message caused by EV_MSC type events.

Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>

hid-input.c | 3 +++
1 files changed, 3 insertions(+)

===================================================================

diff -Nru a/drivers/usb/input/hid-input.c b/drivers/usb/input/hid-input.c
--- a/drivers/usb/input/hid-input.c 2005-02-02 20:29:40 +01:00
+++ b/drivers/usb/input/hid-input.c 2005-02-02 20:29:40 +01:00
@@ -492,6 +492,9 @@
if (type == EV_FF)
return hid_ff_event(hid, dev, type, code, value);

+ if (type != EV_LED)
+ return -1;
+
if ((offset = hid_find_field(hid, type, code, &field)) == -1) {
warn("event field not found");
return -1;