提交 3bce6f64 编写于 作者: P Paul Gortmaker 提交者: Greg Kroah-Hartman

drivers/tty: make sysrq.c slightly more explicitly non-modular

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 <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jslaby@suse.com>
Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 7154988f
...@@ -1003,6 +1003,10 @@ static const struct kernel_param_ops param_ops_sysrq_reset_seq = { ...@@ -1003,6 +1003,10 @@ static const struct kernel_param_ops param_ops_sysrq_reset_seq = {
#define param_check_sysrq_reset_seq(name, p) \ #define param_check_sysrq_reset_seq(name, p) \
__param_check(name, p, unsigned short) __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, module_param_array_named(reset_seq, sysrq_reset_seq, sysrq_reset_seq,
&sysrq_reset_seq_len, 0644); &sysrq_reset_seq_len, 0644);
...@@ -1119,4 +1123,4 @@ static int __init sysrq_init(void) ...@@ -1119,4 +1123,4 @@ static int __init sysrq_init(void)
return 0; return 0;
} }
module_init(sysrq_init); device_initcall(sysrq_init);
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册