Commit 377e10fb authored by Anssi Hannula's avatar Anssi Hannula Committed by Jiri Kosina

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: default avatarAnssi Hannula <anssi.hannula@gmail.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent 02008faa
......@@ -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
......
......@@ -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 ");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment