All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Gortmaker <paul.gortmaker@windriver.com>
To: <linux-kernel@vger.kernel.org>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jiri Slaby <jslaby@suse.com>
Subject: [PATCH 2/5] drivers/tty: make sysrq.c slightly more explicitly non-modular
Date: Wed, 19 Aug 2015 17:48:06 -0400	[thread overview]
Message-ID: <1440020889-12120-3-git-send-email-paul.gortmaker@windriver.com> (raw)
In-Reply-To: <1440020889-12120-1-git-send-email-paul.gortmaker@windriver.com>

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: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 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


  parent reply	other threads:[~2015-08-19 21:48 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-19 21:48 [PATCH v2 0/5] drivers/tty: make more bool drivers explicitly non-modular Paul Gortmaker
2015-08-19 21:48 ` Paul Gortmaker
2015-08-19 21:48 ` Paul Gortmaker
2015-08-19 21:48 ` [PATCH 1/5] drivers/tty: make pty.c slightly more " Paul Gortmaker
2015-08-19 21:48 ` Paul Gortmaker [this message]
2015-08-19 21:48 ` [PATCH 3/5] drivers/tty: make hvc_console.c " Paul Gortmaker
2015-08-19 21:48 ` [PATCH 4/5] drivers/tty: make serial/mpsc.c driver " Paul Gortmaker
2015-08-19 21:48   ` Paul Gortmaker
2015-10-09 13:38   ` Thierry Reding
2015-10-10 19:18     ` Paul Gortmaker
2015-10-10 19:18       ` Paul Gortmaker
2015-08-19 21:48 ` [PATCH 5/5] drivers/tty: make serial 8250_lpc18xx.c Kconfig a tristate Paul Gortmaker
2015-08-19 21:48   ` Paul Gortmaker
2015-08-19 21:48   ` Paul Gortmaker
2015-08-20  6:58   ` Joachim Eastwood
2015-08-20  6:58     ` Joachim Eastwood
2015-08-20  6:58     ` Joachim Eastwood
2015-09-26 22:53 ` [PATCH v2 0/5] drivers/tty: make more bool drivers explicitly non-modular Paul Gortmaker
2015-09-26 22:53   ` Paul Gortmaker
2015-09-26 22:53   ` Paul Gortmaker
2015-09-27 19:42   ` Greg Kroah-Hartman
2015-09-27 19:42     ` Greg Kroah-Hartman
  -- strict thread matches above, loose matches on Subject: below --
2015-08-09  0:51 [PATCH " Paul Gortmaker
2015-08-09  0:51 ` [PATCH 2/5] drivers/tty: make sysrq.c slightly more " Paul Gortmaker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1440020889-12120-3-git-send-email-paul.gortmaker@windriver.com \
    --to=paul.gortmaker@windriver.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.