Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752217AbbHSVs2 (ORCPT ); Wed, 19 Aug 2015 17:48:28 -0400 Received: from mail1.windriver.com ([147.11.146.13]:55399 "EHLO mail1.windriver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751864AbbHSVs0 (ORCPT ); Wed, 19 Aug 2015 17:48:26 -0400 From: Paul Gortmaker To: CC: Paul Gortmaker , Greg Kroah-Hartman , Jiri Slaby Subject: [PATCH 2/5] drivers/tty: make sysrq.c slightly more explicitly non-modular Date: Wed, 19 Aug 2015 17:48:06 -0400 Message-ID: <1440020889-12120-3-git-send-email-paul.gortmaker@windriver.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1440020889-12120-1-git-send-email-paul.gortmaker@windriver.com> References: <1440020889-12120-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: 1736 Lines: 52 The Kconfig currently controlling compilation of this code is: config.debug:config MAGIC_SYSRQ bool "Magic SysRq key" ...meaning that it currently is not being built as a module by anyone. Lets remove the traces of modularity we can so that when reading the driver there is less 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 don't delete the module.h include since other parts of the file are using content from there. Cc: Greg Kroah-Hartman Cc: Jiri Slaby Signed-off-by: Paul Gortmaker --- drivers/tty/sysrq.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/tty/sysrq.c b/drivers/tty/sysrq.c index b5b427888b24..dd2c435e223e 100644 --- a/drivers/tty/sysrq.c +++ b/drivers/tty/sysrq.c @@ -996,6 +996,10 @@ static const struct kernel_param_ops param_ops_sysrq_reset_seq = { #define param_check_sysrq_reset_seq(name, p) \ __param_check(name, p, unsigned short) +/* + * not really modular, but the easiest way to keep compat with existing + * bootargs behaviour is to continue using module_param here. + */ module_param_array_named(reset_seq, sysrq_reset_seq, sysrq_reset_seq, &sysrq_reset_seq_len, 0644); @@ -1112,4 +1116,4 @@ static int __init sysrq_init(void) return 0; } -module_init(sysrq_init); +device_initcall(sysrq_init); -- 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/