From: Dmitry Torokhov <dtor_core@ameritech.net>
To: Vojtech Pavlik <vojtech@suse.cz>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH 4/7] Input: i8042 runtime debug switch
Date: Thu, 21 Oct 2004 02:28:01 -0500 [thread overview]
Message-ID: <200410210228.03038.dtor_core@ameritech.net> (raw)
In-Reply-To: <200410210226.12239.dtor_core@ameritech.net>
===================================================================
ChangeSet@1.1964, 2004-10-19 00:49:51-05:00, dtor_core@ameritech.net
Input: i8042 - allow turning debugging on and off "on-fly"
so people do not have to recompile their kernels to
provide debug info.
Adds new parameter i8042.debug also accessible through
sysfs.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
i8042.c | 8 +++++++-
i8042.h | 8 ++++++--
2 files changed, 13 insertions(+), 3 deletions(-)
===================================================================
diff -Nru a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c
--- a/drivers/input/serio/i8042.c 2004-10-21 02:10:38 -05:00
+++ b/drivers/input/serio/i8042.c 2004-10-21 02:10:38 -05:00
@@ -63,6 +63,13 @@
MODULE_PARM_DESC(noacpi, "Do not use ACPI to detect controller settings");
#endif
+#define DEBUG
+#ifdef DEBUG
+static int i8042_debug;
+module_param_named(debug, i8042_debug, bool, 600);
+MODULE_PARM_DESC(debug, "Turn i8042 debugging mode on and off");
+#endif
+
__obsolete_setup("i8042_noaux");
__obsolete_setup("i8042_nomux");
__obsolete_setup("i8042_unlock");
@@ -70,7 +77,6 @@
__obsolete_setup("i8042_direct");
__obsolete_setup("i8042_dumbkbd");
-#undef DEBUG
#include "i8042.h"
spinlock_t i8042_lock = SPIN_LOCK_UNLOCKED;
diff -Nru a/drivers/input/serio/i8042.h b/drivers/input/serio/i8042.h
--- a/drivers/input/serio/i8042.h 2004-10-21 02:10:38 -05:00
+++ b/drivers/input/serio/i8042.h 2004-10-21 02:10:38 -05:00
@@ -119,8 +119,12 @@
#ifdef DEBUG
static unsigned long i8042_start;
#define dbg_init() do { i8042_start = jiffies; } while (0)
-#define dbg(format, arg...) printk(KERN_DEBUG __FILE__ ": " format " [%d]\n" ,\
- ## arg, (int) (jiffies - i8042_start))
+#define dbg(format, arg...) \
+ do { \
+ if (i8042_debug) \
+ printk(KERN_DEBUG __FILE__ ": " format " [%d]\n" , \
+ ## arg, (int) (jiffies - i8042_start)); \
+ } while (0)
#else
#define dbg_init() do { } while (0)
#define dbg(format, arg...) do {} while (0)
next prev parent reply other threads:[~2004-10-21 7:47 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-21 7:23 [PATCH 0/7] New input patches Dmitry Torokhov
2004-10-21 7:24 ` [PATCH 1/7] Input: whitespace fixes Dmitry Torokhov
2004-10-21 7:25 ` [PATCH 2/7] Input: remove class devices on disconnect Dmitry Torokhov
2004-10-21 7:26 ` [PATCH 3/7] Input: link input_dev and serio (sysfs) Dmitry Torokhov
2004-10-21 7:28 ` Dmitry Torokhov [this message]
2004-10-21 7:28 ` [PATCH 5/7] Input: i8042 remove old-style PM handling Dmitry Torokhov
2004-10-21 7:29 ` [PATCH 6/7] Input: i8042 remove reboot notifier Dmitry Torokhov
2004-10-21 7:30 ` [PATCH 7/7] Input: remove pm_dev from core Dmitry Torokhov
2004-10-21 9:13 ` Russell King
2004-10-21 13:25 ` Dmitry Torokhov
2004-10-23 20:49 ` Russell King
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=200410210228.03038.dtor_core@ameritech.net \
--to=dtor_core@ameritech.net \
--cc=linux-kernel@vger.kernel.org \
--cc=vojtech@suse.cz \
/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.