From: Anssi Hannula <anssi.hannula@gmail.com>
To: Jiri Kosina <jkosina@suse.cz>
Cc: linux-input@vger.kernel.org
Subject: [patch] hid: only dump report traffic with debug level 2
Date: Fri, 21 Mar 2008 22:52:29 +0200 [thread overview]
Message-ID: <47E4200D.9080904@gmail.com> (raw)
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>
---
Index: linux-2.6.24-verbosehid/drivers/hid/hid-core.c
===================================================================
--- linux-2.6.24-verbosehid/drivers/hid/hid-core.c
+++ linux-2.6.24-verbosehid/drivers/hid/hid-core.c 2008-03-21 13:03:29.000000000 +0200
@@ -43,8 +43,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: linux-2.6.24-verbosehid/drivers/hid/hid-debug.c
===================================================================
--- linux-2.6.24-verbosehid/drivers/hid/hid-debug.c
+++ linux-2.6.24-verbosehid/drivers/hid/hid-debug.c 2008-03-21 13:01:21.000000000 +0200
@@ -498,7 +498,7 @@
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 ");
-- Anssi Hannula
next reply other threads:[~2008-03-21 20:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-21 20:52 Anssi Hannula [this message]
2008-03-22 21:50 ` [patch] hid: only dump report traffic with debug level 2 Jiri Kosina
2008-03-22 21:59 ` Anssi Hannula
2008-03-22 22:31 ` Jiri Kosina
2008-03-22 22:33 ` Anssi Hannula
2008-03-22 22:36 ` Jiri Kosina
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47E4200D.9080904@gmail.com \
--to=anssi.hannula@gmail.com \
--cc=jkosina@suse.cz \
--cc=linux-input@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.