]> err.no Git - linux-2.6/commitdiff
HID: only dump report traffic with debug level 2
authorAnssi Hannula <anssi.hannula@gmail.com>
Sat, 22 Mar 2008 22:50:13 +0000 (23:50 +0100)
committerJiri Kosina <jkosina@suse.cz>
Tue, 22 Apr 2008 09:34:57 +0000 (11:34 +0200)
Currently using debug=1 with hid module prints out all sent and received
reports to the kernel log, while in many cases we only want to see the
report descriptors and hid-input mappings that are printed when a device
is probed.

Add new level debug=2, and only dump the report traffic with that level.

Signed-off-by: Anssi Hannula <anssi.hannula@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-core.c
drivers/hid/hid-debug.c

index f0b00ec1e47e7c1c0daf85cd6cc864f2c0c2c555..538bf28e4dd5233d84341fc45b25f59b9cc9c6e2 100644 (file)
@@ -44,8 +44,8 @@
 
 #ifdef CONFIG_HID_DEBUG
 int hid_debug = 0;
-module_param_named(debug, hid_debug, bool, 0600);
-MODULE_PARM_DESC(debug, "Turn HID debugging mode on and off");
+module_param_named(debug, hid_debug, int, 0600);
+MODULE_PARM_DESC(debug, "HID debugging (0=off, 1=probing info, 2=continuous data dumping)");
 EXPORT_SYMBOL_GPL(hid_debug);
 #endif
 
index 5c24fe46d8eb9c423637888f163e70dedb2281c2..f88714b0600007c3e54d3f85a2a4ea60eeb12574 100644 (file)
@@ -498,7 +498,7 @@ void hid_dump_device(struct hid_device *device) {
 EXPORT_SYMBOL_GPL(hid_dump_device);
 
 void hid_dump_input(struct hid_usage *usage, __s32 value) {
-       if (!hid_debug)
+       if (hid_debug < 2)
                return;
 
        printk(KERN_DEBUG "hid-debug: input ");