Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1436720

[PATCH 2/6] mfd: as3722: Make it explicitly non-modular

From Paul Gortmaker <paul.gortmaker@windriver.com>
Newsgroups linux.kernel
Subject [PATCH 2/6] mfd: as3722: Make it explicitly non-modular
Date 2016-07-05 03:30 +0200
Message-ID <rRnlw-4AT-21@gated-at.bofh.it> (permalink)
References <rRnlw-4AT-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


The Kconfig currently controlling compilation of this code is:

drivers/mfd/Kconfig:config MFD_AS3722
drivers/mfd/Kconfig:    bool "ams AS3722 Power Management IC"

...meaning that it currently is not being built as a module by anyone.

Lets remove the modular code that is essentially orphaned, so that
when reading the driver there is no doubt it is builtin-only.

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: Samuel Ortiz <sameo@linux.intel.com>
Cc: Lee Jones <lee.jones@linaro.org>
Cc: Florian Lobmaier <florian.lobmaier@ams.com>
Cc: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 drivers/mfd/as3722.c | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/drivers/mfd/as3722.c b/drivers/mfd/as3722.c
index f87342c211bc..c8a199d081ce 100644
--- a/drivers/mfd/as3722.c
+++ b/drivers/mfd/as3722.c
@@ -27,7 +27,7 @@
 #include <linux/interrupt.h>
 #include <linux/irq.h>
 #include <linux/kernel.h>
-#include <linux/module.h>
+#include <linux/init.h>
 #include <linux/mfd/core.h>
 #include <linux/mfd/as3722.h>
 #include <linux/of.h>
@@ -439,13 +439,11 @@ static const struct of_device_id as3722_of_match[] = {
 	{ .compatible = "ams,as3722", },
 	{},
 };
-MODULE_DEVICE_TABLE(of, as3722_of_match);
 
 static const struct i2c_device_id as3722_i2c_id[] = {
 	{ "as3722", 0 },
 	{},
 };
-MODULE_DEVICE_TABLE(i2c, as3722_i2c_id);
 
 static const struct dev_pm_ops as3722_pm_ops = {
 	SET_SYSTEM_SLEEP_PM_OPS(as3722_i2c_suspend, as3722_i2c_resume)
@@ -460,10 +458,4 @@ static struct i2c_driver as3722_i2c_driver = {
 	.probe = as3722_i2c_probe,
 	.id_table = as3722_i2c_id,
 };
-
-module_i2c_driver(as3722_i2c_driver);
-
-MODULE_DESCRIPTION("I2C support for AS3722 PMICs");
-MODULE_AUTHOR("Florian Lobmaier <florian.lobmaier@ams.com>");
-MODULE_AUTHOR("Laxman Dewangan <ldewangan@nvidia.com>");
-MODULE_LICENSE("GPL");
+builtin_i2c_driver(as3722_i2c_driver);
-- 
2.8.4

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/6] mfd: trivial demodularization of non-modular drivers. Paul Gortmaker <paul.gortmaker@windriver.com> - 2016-07-05 03:30 +0200
  [PATCH 5/6] mfd: sun6i-prcm: Make it explicitly non-modular Paul Gortmaker <paul.gortmaker@windriver.com> - 2016-07-05 03:30 +0200
    Re: [PATCH 5/6] mfd: sun6i-prcm: Make it explicitly non-modular Maxime Ripard <maxime.ripard@free-electrons.com> - 2016-07-05 08:30 +0200
  [PATCH 2/6] mfd: as3722: Make it explicitly non-modular Paul Gortmaker <paul.gortmaker@windriver.com> - 2016-07-05 03:30 +0200
    Re: [PATCH 2/6] mfd: as3722: Make it explicitly non-modular Laxman Dewangan <ldewangan@nvidia.com> - 2016-07-05 08:10 +0200
      Re: [PATCH 2/6] mfd: as3722: Make it explicitly non-modular Paul Gortmaker <paul.gortmaker@windriver.com> - 2016-07-06 18:50 +0200

csiph-web