Thread (2 messages) 2 messages, 2 authors, 2010-09-08

[PATCH] HID: wake up reading tasks when debug event occurs

From: Chase Douglas <hidden>
Date: 2010-08-30 17:28:00
Also in: lkml
Subsystem: hid core layer, the rest · Maintainers: Jiri Kosina, Benjamin Tissoires, Linus Torvalds

From: Chase Douglas <redacted>

Some devices poke the hid core in a way that causes hid_debug_event to
be called, while never calling hid_dump_input. Without this wakeup
addition, tasks reading for hid events through debugfs may never see any
events. It may be that a well written driver doesn't cause this, but
then what's the point of debugfs?

Signed-off-by: Chase Douglas <redacted>
---
 drivers/hid/hid-debug.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/hid/hid-debug.c b/drivers/hid/hid-debug.c
index 850d02a..adff4ef 100644
--- a/drivers/hid/hid-debug.c
+++ b/drivers/hid/hid-debug.c
@@ -570,6 +570,8 @@ void hid_debug_event(struct hid_device *hdev, char *buf)
 				buf[i];
 		list->tail = (list->tail + i) % HID_DEBUG_BUFSIZE;
         }
+
+	wake_up_interruptible(&hdev->debug_wait);
 }
 EXPORT_SYMBOL_GPL(hid_debug_event);
 
-- 
1.7.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help