From: Paul Gortmaker <paul.gortmaker@windriver.com> To: <linux-kernel@vger.kernel.org> Cc: Paul Gortmaker <paul.gortmaker@windriver.com>, Tony Lindgren <tony@atomide.com>, Samuel Ortiz <sameo@linux.intel.com>, Lee Jones <lee.jones@linaro.org>, <linux-omap@vger.kernel.org> Subject: [PATCH 6/6] mfd: twl-core: Make it explicitly non-modular Date: Mon, 12 Sep 2016 10:40:54 -0400 [thread overview] Message-ID: <20160912144054.27522-7-paul.gortmaker@windriver.com> (raw) In-Reply-To: <20160912144054.27522-1-paul.gortmaker@windriver.com> 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 <tony@atomide.com> Cc: Samuel Ortiz <sameo@linux.intel.com> Cc: Lee Jones <lee.jones@linaro.org> Cc: linux-omap@vger.kernel.org Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> --- 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 <linux/init.h> #include <linux/mutex.h> -#include <linux/module.h> #include <linux/platform_device.h> #include <linux/regmap.h> #include <linux/clk.h> @@ -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
WARNING: multiple messages have this Message-ID (diff)
From: Paul Gortmaker <paul.gortmaker@windriver.com> To: linux-kernel@vger.kernel.org Cc: Paul Gortmaker <paul.gortmaker@windriver.com>, Tony Lindgren <tony@atomide.com>, Samuel Ortiz <sameo@linux.intel.com>, Lee Jones <lee.jones@linaro.org>, linux-omap@vger.kernel.org Subject: [PATCH 6/6] mfd: twl-core: Make it explicitly non-modular Date: Mon, 12 Sep 2016 10:40:54 -0400 [thread overview] Message-ID: <20160912144054.27522-7-paul.gortmaker@windriver.com> (raw) In-Reply-To: <20160912144054.27522-1-paul.gortmaker@windriver.com> 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 <tony@atomide.com> Cc: Samuel Ortiz <sameo@linux.intel.com> Cc: Lee Jones <lee.jones@linaro.org> Cc: linux-omap@vger.kernel.org Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> --- 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 <linux/init.h> #include <linux/mutex.h> -#include <linux/module.h> #include <linux/platform_device.h> #include <linux/regmap.h> #include <linux/clk.h> @@ -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
next prev parent reply other threads:[~2016-09-12 14:41 UTC|newest] Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top 2016-09-12 14:40 [PATCH v2 0/6] mfd: trivial demodularization of non-modular drivers Paul Gortmaker 2016-09-12 14:40 ` Paul Gortmaker 2016-09-12 14:40 ` [PATCH 1/6] mfd: altera-a10sr: make it explicitly non-modular Paul Gortmaker 2016-09-13 8:52 ` Lee Jones 2016-09-12 14:40 ` [PATCH 2/6] mfd: as3722: convert MFD_AS3722 from bool to tristate Paul Gortmaker 2016-09-13 8:52 ` Lee Jones 2016-09-12 14:40 ` [PATCH 3/6] mfd: intel_msic: Make it explicitly non-modular Paul Gortmaker 2016-09-13 8:52 ` Lee Jones 2016-09-12 14:40 ` [PATCH 4/6] mfd: smsc-ece1099: " Paul Gortmaker 2016-09-13 8:52 ` Lee Jones 2016-09-12 14:40 ` [PATCH 5/6] mfd: sun6i-prcm: " Paul Gortmaker 2016-09-12 17:43 ` Boris Brezillon 2016-09-13 8:53 ` Lee Jones 2016-09-12 14:40 ` Paul Gortmaker [this message] 2016-09-12 14:40 ` [PATCH 6/6] mfd: twl-core: " Paul Gortmaker 2016-09-13 3:26 ` Tony Lindgren 2016-09-13 8:53 ` Lee Jones -- strict thread matches above, loose matches on Subject: below -- 2016-07-05 1:25 [PATCH 0/6] mfd: trivial demodularization of non-modular drivers Paul Gortmaker 2016-07-05 1:25 ` [PATCH 6/6] mfd: twl-core: Make it explicitly non-modular Paul Gortmaker 2016-07-05 1:25 ` Paul Gortmaker 2016-08-05 12:58 ` Lee Jones
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=20160912144054.27522-7-paul.gortmaker@windriver.com \ --to=paul.gortmaker@windriver.com \ --cc=lee.jones@linaro.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-omap@vger.kernel.org \ --cc=sameo@linux.intel.com \ --cc=tony@atomide.com \ /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: linkBe 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.