Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

HID: only dump report traffic with debug level 2

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>

authored by

Anssi Hannula and committed by
Jiri Kosina
377e10fb 02008faa

+3 -3
+2 -2
drivers/hid/hid-core.c
··· 44 44 45 45 #ifdef CONFIG_HID_DEBUG 46 46 int hid_debug = 0; 47 - module_param_named(debug, hid_debug, bool, 0600); 48 - MODULE_PARM_DESC(debug, "Turn HID debugging mode on and off"); 47 + module_param_named(debug, hid_debug, int, 0600); 48 + MODULE_PARM_DESC(debug, "HID debugging (0=off, 1=probing info, 2=continuous data dumping)"); 49 49 EXPORT_SYMBOL_GPL(hid_debug); 50 50 #endif 51 51
+1 -1
drivers/hid/hid-debug.c
··· 498 498 EXPORT_SYMBOL_GPL(hid_dump_device); 499 499 500 500 void hid_dump_input(struct hid_usage *usage, __s32 value) { 501 - if (!hid_debug) 501 + if (hid_debug < 2) 502 502 return; 503 503 504 504 printk(KERN_DEBUG "hid-debug: input ");