Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752494AbbHSVuV (ORCPT ); Wed, 19 Aug 2015 17:50:21 -0400 Received: from mail.windriver.com ([147.11.1.11]:52818 "EHLO mail.windriver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751887AbbHSVuS (ORCPT ); Wed, 19 Aug 2015 17:50:18 -0400 From: Paul Gortmaker To: CC: Paul Gortmaker , Greg Kroah-Hartman , Jiri Slaby Subject: [PATCH 1/5] drivers/tty: make pty.c slightly more explicitly non-modular Date: Wed, 19 Aug 2015 17:48:05 -0400 Message-ID: <1440020889-12120-2-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: 2002 Lines: 70 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 Cc: Jiri Slaby Signed-off-by: Paul Gortmaker --- drivers/tty/pty.c | 7 +++++-- 1 file 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 - #include #include #include @@ -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); -- 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/