Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2992760AbbHHUfw (ORCPT ); Sat, 8 Aug 2015 16:35:52 -0400 Received: from mail.windriver.com ([147.11.1.11]:42031 "EHLO mail.windriver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2992525AbbHHUfu (ORCPT ); Sat, 8 Aug 2015 16:35:50 -0400 From: Paul Gortmaker To: CC: Paul Gortmaker , Jason Wessel , Arnd Bergmann , Greg Kroah-Hartman , Subject: [PATCH 4/4] drivers/misc: make kgdbts.c slightly more explicitly non-modular Date: Sat, 8 Aug 2015 16:35:05 -0400 Message-ID: <1439066105-18412-5-git-send-email-paul.gortmaker@windriver.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1439066105-18412-1-git-send-email-paul.gortmaker@windriver.com> References: <1439066105-18412-1-git-send-email-paul.gortmaker@windriver.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2148 Lines: 63 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 Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Cc: kgdb-bugreport@lists.sourceforge.net Signed-off-by: Paul Gortmaker --- 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, "[F#|S#][N#]"); -MODULE_DESCRIPTION("KGDB Test Suite"); -MODULE_LICENSE("GPL"); -MODULE_AUTHOR("Wind River Systems, Inc."); - -- 2.5.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/