Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drivers/misc: make kgdbts.c slightly more explicitly non-modular

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>

authored by

Paul Gortmaker and committed by
Greg Kroah-Hartman
67dd339c 2544007b

+5 -5
+5 -5
drivers/misc/kgdbts.c
··· 1112 1112 1113 1113 return configure_kgdbts(); 1114 1114 } 1115 + device_initcall(init_kgdbts); 1115 1116 1116 1117 static int kgdbts_get_char(void) 1117 1118 { ··· 1181 1180 .post_exception = kgdbts_post_exp_handler, 1182 1181 }; 1183 1182 1184 - module_init(init_kgdbts); 1183 + /* 1184 + * not really modular, but the easiest way to keep compat with existing 1185 + * bootargs behaviour is to continue using module_param here. 1186 + */ 1185 1187 module_param_call(kgdbts, param_set_kgdbts_var, param_get_string, &kps, 0644); 1186 1188 MODULE_PARM_DESC(kgdbts, "<A|V1|V2>[F#|S#][N#]"); 1187 - MODULE_DESCRIPTION("KGDB Test Suite"); 1188 - MODULE_LICENSE("GPL"); 1189 - MODULE_AUTHOR("Wind River Systems, Inc."); 1190 -