diff options
author | Paul Gortmaker <paul.gortmaker@windriver.com> | 2015-08-20 00:48:05 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-10-04 19:27:56 +0300 |
commit | 7154988fec43fe2ed986f3b7dd5b43171fab64d6 (patch) | |
tree | f71452d708aaccd41a742ebd1992e7e8d7c11ba8 /drivers/tty/pty.c | |
parent | e4fda3a0427526bcbca4e2b6528bc95a6fbc15ed (diff) | |
download | linux-7154988fec43fe2ed986f3b7dd5b43171fab64d6.tar.xz |
drivers/tty: make pty.c slightly more explicitly non-modular
The Kconfig currently controlling compilation of this code is:
drivers/tty/Kconfig:config LEGACY_PTYS
drivers/tty/Kconfig: bool "Legacy (BSD) PTY support"
...and:
drivers/tty/Kconfig:config UNIX98_PTYS
drivers/tty/Kconfig: bool "Unix98 PTY support" if EXPERT
combined with this:
obj-$(CONFIG_LEGACY_PTYS) += pty.o
obj-$(CONFIG_UNIX98_PTYS) += pty.o
...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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/pty.c')
-rw-r--r-- | drivers/tty/pty.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/tty/pty.c b/drivers/tty/pty.c index 4d5937c185c1..a45660f62db5 100644 --- a/drivers/tty/pty.c +++ b/drivers/tty/pty.c @@ -7,7 +7,6 @@ */ #include <linux/module.h> - #include <linux/errno.h> #include <linux/interrupt.h> #include <linux/tty.h> @@ -501,6 +500,10 @@ static int pty_bsd_ioctl(struct tty_struct *tty, } static int legacy_count = CONFIG_LEGACY_PTY_COUNT; +/* + * not really modular, but the easiest way to keep compat with existing + * bootargs behaviour is to continue using module_param here. + */ module_param(legacy_count, int, 0); /* @@ -877,4 +880,4 @@ static int __init pty_init(void) unix98_pty_init(); return 0; } -module_init(pty_init); +device_initcall(pty_init); |