Skip to content

Commit

Permalink
drivers/misc: make kgdbts.c slightly more explicitly non-modular
Browse files Browse the repository at this point in the history
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: Arnd Bergmann <arnd@arndb.de>
Cc: kgdb-bugreport@lists.sourceforge.net
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Acked-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Paul Gortmaker authored and Greg Kroah-Hartman committed Sep 21, 2015
1 parent 2544007 commit 67dd339
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions drivers/misc/kgdbts.c
Original file line number Diff line number Diff line change
Expand Up @@ -1112,6 +1112,7 @@ static int __init init_kgdbts(void)

return configure_kgdbts();
}
device_initcall(init_kgdbts);

static int kgdbts_get_char(void)
{
Expand Down Expand Up @@ -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.");

0 comments on commit 67dd339

Please sign in to comment.