From: Paul Gortmaker <paul.gortmaker@windriver.com>
To: <linux-kernel@vger.kernel.org>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>,
Jason Wessel <jason.wessel@windriver.com>,
Arnd Bergmann <arnd@arndb.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
<kgdb-bugreport@lists.sourceforge.net>
Subject: [PATCH 4/4] drivers/misc: make kgdbts.c slightly more explicitly non-modular
Date: Sat, 8 Aug 2015 16:35:05 -0400 [thread overview]
Message-ID: <1439066105-18412-5-git-send-email-paul.gortmaker@windriver.com> (raw)
In-Reply-To: <1439066105-18412-1-git-send-email-paul.gortmaker@windriver.com>
The Kconfig currently controlling compilation of this code is:
lib/Kconfig.kgdb:config KGDB_TESTS
lib/Kconfig.kgdb: bool "KGDB: internal test suite"
...meaning that it currently is not being built as a module by anyone.
Lets remove the modular code that is essentially orphaned, so that
when reading the driver there is no doubt it is builtin-only.
Since module_init translates to device_initcall in the non-modular
case, the init ordering remains unchanged with this commit.
We also delete the MODULE_LICENSE tag etc. since all that information
is already contained at the top of the file in the comments.
We can't remove the module.h include since we've kept the use of
module_param in this file for now.
Cc: Jason Wessel <jason.wessel@windriver.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: kgdb-bugreport@lists.sourceforge.net
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
drivers/misc/kgdbts.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/misc/kgdbts.c b/drivers/misc/kgdbts.c
index 9a60bd4d3c49..99635dd9dbac 100644
--- a/drivers/misc/kgdbts.c
+++ b/drivers/misc/kgdbts.c
@@ -1112,6 +1112,7 @@ static int __init init_kgdbts(void)
return configure_kgdbts();
}
+device_initcall(init_kgdbts);
static int kgdbts_get_char(void)
{
@@ -1180,10 +1181,9 @@ static struct kgdb_io kgdbts_io_ops = {
.post_exception = kgdbts_post_exp_handler,
};
-module_init(init_kgdbts);
+/*
+ * not really modular, but the easiest way to keep compat with existing
+ * bootargs behaviour is to continue using module_param here.
+ */
module_param_call(kgdbts, param_set_kgdbts_var, param_get_string, &kps, 0644);
MODULE_PARM_DESC(kgdbts, "<A|V1|V2>[F#|S#][N#]");
-MODULE_DESCRIPTION("KGDB Test Suite");
-MODULE_LICENSE("GPL");
-MODULE_AUTHOR("Wind River Systems, Inc.");
-
--
2.5.0
next prev parent reply other threads:[~2015-08-08 20:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-08 20:35 [PATCH 0/4] char/misc: make some drivers " Paul Gortmaker
2015-08-08 20:35 ` [PATCH 1/4] drivers/char: make efirtc.c driver " Paul Gortmaker
2015-08-08 20:35 ` [PATCH 2/4] drivers/char: make SGI snsc.c " Paul Gortmaker
2015-08-08 20:35 ` [PATCH 3/4] drivers/char: make hpet.c " Paul Gortmaker
2015-08-08 20:35 ` Paul Gortmaker [this message]
2015-08-10 17:22 ` [PATCH 4/4] drivers/misc: make kgdbts.c slightly more " Jason Wessel
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=1439066105-18412-5-git-send-email-paul.gortmaker@windriver.com \
--to=paul.gortmaker@windriver.com \
--cc=arnd@arndb.de \
--cc=gregkh@linuxfoundation.org \
--cc=jason.wessel@windriver.com \
--cc=kgdb-bugreport@lists.sourceforge.net \
--cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®