]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
HID: debugfs: wake up reading tasks upon event
authorChase Douglas <chase.douglas@ubuntu.com>
Mon, 30 Aug 2010 17:27:45 +0000 (13:27 -0400)
committerJiri Kosina <jkosina@suse.cz>
Wed, 8 Sep 2010 10:04:03 +0000 (12:04 +0200)
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 <chase.douglas@canonical.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-debug.c

index 850d02a7a92539056d85b0b18eba88f8cb73cb38..adff4efdc16926e0b5a2f2015eb5b544c3cd8dab 100644 (file)
@@ -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);