From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759571AbcILOld (ORCPT ); Mon, 12 Sep 2016 10:41:33 -0400 Received: from mail5.windriver.com ([192.103.53.11]:60722 "EHLO mail5.wrs.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759545AbcILOl0 (ORCPT ); Mon, 12 Sep 2016 10:41:26 -0400 From: Paul Gortmaker To: CC: Paul Gortmaker , Tony Lindgren , Samuel Ortiz , Lee Jones , Subject: [PATCH 6/6] mfd: twl-core: Make it explicitly non-modular Date: Mon, 12 Sep 2016 10:40:54 -0400 Message-ID: <20160912144054.27522-7-paul.gortmaker@windriver.com> X-Mailer: git-send-email 2.8.4 In-Reply-To: <20160912144054.27522-1-paul.gortmaker@windriver.com> References: <20160912144054.27522-1-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 The Kconfig currently controlling compilation of this code is: drivers/mfd/Kconfig:config TWL4030_CORE drivers/mfd/Kconfig: bool "TI TWL4030/TWL5030/TWL6030/TPS659x0 Support" ...meaning that it currently is not being built as a module by anyone. Lets remove what modular code that we can, so that when reading the driver there is less doubt that it is builtin-only. Note that we can't remove the twl_remove() itself ; it is still used by the probe unwind routine. So we leave it linked into the .remove as well, even though it will most likely never be called via that path from an unbind. Since module_i2c_driver() uses the same init level priority as builtin_i2c_driver() the init ordering remains unchanged with this commit. Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. We also delete the MODULE_LICENSE tag etc. since all that information is already contained at the top of the file in the comments. Cc: Tony Lindgren Cc: Samuel Ortiz Cc: Lee Jones Cc: linux-omap@vger.kernel.org Signed-off-by: Paul Gortmaker --- drivers/mfd/twl-core.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c index a49d3db6d936..c64615dca2bd 100644 --- a/drivers/mfd/twl-core.c +++ b/drivers/mfd/twl-core.c @@ -30,7 +30,6 @@ #include #include -#include #include #include #include @@ -1258,7 +1257,6 @@ static const struct i2c_device_id twl_ids[] = { { "twl6032", TWL6030_CLASS | TWL6032_SUBCLASS }, /* "Phoenix lite" */ { /* end of list */ }, }; -MODULE_DEVICE_TABLE(i2c, twl_ids); /* One Client Driver , 4 Clients */ static struct i2c_driver twl_driver = { @@ -1267,9 +1265,4 @@ static struct i2c_driver twl_driver = { .probe = twl_probe, .remove = twl_remove, }; - -module_i2c_driver(twl_driver); - -MODULE_AUTHOR("Texas Instruments, Inc."); -MODULE_DESCRIPTION("I2C Core interface for TWL"); -MODULE_LICENSE("GPL"); +builtin_i2c_driver(twl_driver); -- 2.8.4 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paul Gortmaker Subject: [PATCH 6/6] mfd: twl-core: Make it explicitly non-modular Date: Mon, 12 Sep 2016 10:40:54 -0400 Message-ID: <20160912144054.27522-7-paul.gortmaker@windriver.com> References: <20160912144054.27522-1-paul.gortmaker@windriver.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: In-Reply-To: <20160912144054.27522-1-paul.gortmaker@windriver.com> Sender: linux-kernel-owner@vger.kernel.org To: linux-kernel@vger.kernel.org Cc: Paul Gortmaker , Tony Lindgren , Samuel Ortiz , Lee Jones , linux-omap@vger.kernel.org List-Id: linux-omap@vger.kernel.org The Kconfig currently controlling compilation of this code is: drivers/mfd/Kconfig:config TWL4030_CORE drivers/mfd/Kconfig: bool "TI TWL4030/TWL5030/TWL6030/TPS659x0 Support" ...meaning that it currently is not being built as a module by anyone. Lets remove what modular code that we can, so that when reading the driver there is less doubt that it is builtin-only. Note that we can't remove the twl_remove() itself ; it is still used by the probe unwind routine. So we leave it linked into the .remove as well, even though it will most likely never be called via that path from an unbind. Since module_i2c_driver() uses the same init level priority as builtin_i2c_driver() the init ordering remains unchanged with this commit. Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. We also delete the MODULE_LICENSE tag etc. since all that information is already contained at the top of the file in the comments. Cc: Tony Lindgren Cc: Samuel Ortiz Cc: Lee Jones Cc: linux-omap@vger.kernel.org Signed-off-by: Paul Gortmaker --- drivers/mfd/twl-core.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c index a49d3db6d936..c64615dca2bd 100644 --- a/drivers/mfd/twl-core.c +++ b/drivers/mfd/twl-core.c @@ -30,7 +30,6 @@ #include #include -#include #include #include #include @@ -1258,7 +1257,6 @@ static const struct i2c_device_id twl_ids[] = { { "twl6032", TWL6030_CLASS | TWL6032_SUBCLASS }, /* "Phoenix lite" */ { /* end of list */ }, }; -MODULE_DEVICE_TABLE(i2c, twl_ids); /* One Client Driver , 4 Clients */ static struct i2c_driver twl_driver = { @@ -1267,9 +1265,4 @@ static struct i2c_driver twl_driver = { .probe = twl_probe, .remove = twl_remove, }; - -module_i2c_driver(twl_driver); - -MODULE_AUTHOR("Texas Instruments, Inc."); -MODULE_DESCRIPTION("I2C Core interface for TWL"); -MODULE_LICENSE("GPL"); +builtin_i2c_driver(twl_driver); -- 2.8.4