linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/9] gpio: batch #1: remove modular usage from non-modular drivers
@ 2016-03-27 15:44 Paul Gortmaker
  2016-03-27 15:44 ` [PATCH 1/9] drivers/gpio: make gpio-bcm-kona.c explicitly non-modular Paul Gortmaker
                   ` (9 more replies)
  0 siblings, 10 replies; 21+ messages in thread
From: Paul Gortmaker @ 2016-03-27 15:44 UTC (permalink / raw)
  To: linux-kernel
  Cc: Paul Gortmaker, Alexandre Courbot, Baruch Siach,
	bcm-kernel-feedback-list, Feng Kan, Jonas Jensen, Jun Nie,
	Linus Walleij, Ray Jui, Wu Guoxing, linux-gpio

For GPIO, I've divided up the the audit of modular usage in non-modular
drivers into three categories to ease review and limit the batch size.
The breakdown of the three groups is as follows:

1) just replacement of modular macros with their non-modular equivalents
   that CPP would have inserted anyway ; this means runtime equivalence
   and actually also binary equivalence.

[This lot represents #1, which are essentially the "free" ones that have
essentially zero impact beyond the original desired cleanup goal itself.]

2) as per #1 but also with the removal of unused/orphaned __exit functions
   that could never be called/exercised.  This also maintains runtime
   equivalence, but since the unused __exit function is gone, there is a
   reduction in the object file size and hence not binary equivalence, eg:
       before: -rw-rw-r-- 1 8828 drivers/gpio/gpio-rc5t583.o
       after:  -rw-rw-r-- 1 7396 drivers/gpio/gpio-rc5t583.o

3) as per #2 but also with the removal of a ".remove" function that is
   hooked into the driver struct.   This ".remove" function would of
   course not be called from the __exit function since that is never run.
   However in theory, someone could have triggered it via sysfs unbind,
   even though there isn't a sensible use case for doing so.  So to cover
   that possibility, we've also disabled sysfs unbind in these drivers.

I will send #2 once this #1 is finalized/merged and #3 once #2 is merged.

For anyone new to the underlying goal of this cleanup, we are trying to
not use module support for code that can never be built as a module since:

 (1) it is easy to accidentally write unused module_exit and remove code
 (2) it can be misleading when reading the source, thinking it can be
     modular when the Makefile and/or Kconfig prohibit it
 (3) it requires the include of the module.h header file which in turn
     includes nearly everything else, thus adding to CPP overhead.
 (4) it gets copied/replicated into other code and spreads like weeds.

Build tested for arm and arm64 on 4.6-rc1 to ensure no silly typos exist.

Paul.
---

Cc: Alexandre Courbot <gnurou@gmail.com>
Cc: Baruch Siach <baruch@tkos.co.il>
Cc: bcm-kernel-feedback-list@broadcom.com
Cc: Feng Kan <fkan@apm.com>
Cc: Jonas Jensen <jonas.jensen@gmail.com>
Cc: Jun Nie <jun.nie@linaro.org>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Ray Jui <rjui@broadcom.com>
Cc: Wu Guoxing <b39297@freescale.com>
Cc: linux-gpio@vger.kernel.org

Paul Gortmaker (9):
  drivers/gpio: make gpio-bcm-kona.c explicitly non-modular
  drivers/gpio: make gpio-mb86s7x.c driver explicitly non-modular
  drivers/gpio: make gpio-mc9s08dz60.c explicitly non-modular
  drivers/gpio: make gpio-moxart.c explicitly non-modular
  drivers/gpio: make gpio-mvebu.c explicitly non-modular
  drivers/gpio: make gpio-pl061.c explicitly non-modular
  drivers/gpio: make gpio-sta2x11.c explicitly non-modular
  drivers/gpio: make gpio-xgene.c explicitly non-modular
  drivers/gpio: make gpio-zx.c explicitly non-modular

 drivers/gpio/gpio-bcm-kona.c   | 14 +++++---------
 drivers/gpio/gpio-mb86s7x.c    |  8 +-------
 drivers/gpio/gpio-mc9s08dz60.c | 12 ++----------
 drivers/gpio/gpio-moxart.c     |  7 +------
 drivers/gpio/gpio-mvebu.c      |  5 ++---
 drivers/gpio/gpio-pl061.c      | 12 ++++--------
 drivers/gpio/gpio-sta2x11.c    |  8 ++------
 drivers/gpio/gpio-xgene.c      |  9 +--------
 drivers/gpio/gpio-zx.c         | 14 ++++++--------
 9 files changed, 24 insertions(+), 65 deletions(-)

-- 
2.6.1

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH 1/9] drivers/gpio: make gpio-bcm-kona.c explicitly non-modular
  2016-03-27 15:44 [PATCH 0/9] gpio: batch #1: remove modular usage from non-modular drivers Paul Gortmaker
@ 2016-03-27 15:44 ` Paul Gortmaker
  2016-03-31 10:01   ` Linus Walleij
  2016-03-27 15:44 ` [PATCH 2/9] drivers/gpio: make gpio-mb86s7x.c driver " Paul Gortmaker
                   ` (8 subsequent siblings)
  9 siblings, 1 reply; 21+ messages in thread
From: Paul Gortmaker @ 2016-03-27 15:44 UTC (permalink / raw)
  To: linux-kernel
  Cc: Paul Gortmaker, Ray Jui, Linus Walleij, Alexandre Courbot,
	bcm-kernel-feedback-list, linux-gpio

The Kconfig currently controlling compilation of this code is:

config GPIO_BCM_KONA
        bool "Broadcom Kona GPIO"

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

Lets remove the couple traces of modularity so that when reading the
driver there is no doubt it is builtin-only.

Since module_platform_driver() uses the same init level priority as
builtin_platform_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
was (or is now) contained at the top of the file in the comments.

Cc: Ray Jui <rjui@broadcom.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Alexandre Courbot <gnurou@gmail.com>
Cc: bcm-kernel-feedback-list@broadcom.com
Cc: linux-gpio@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 drivers/gpio/gpio-bcm-kona.c | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/drivers/gpio/gpio-bcm-kona.c b/drivers/gpio/gpio-bcm-kona.c
index 2fd38d598f3d..9aabc48ff5de 100644
--- a/drivers/gpio/gpio-bcm-kona.c
+++ b/drivers/gpio/gpio-bcm-kona.c
@@ -1,4 +1,7 @@
 /*
+ * Broadcom Kona GPIO Driver
+ *
+ * Author: Broadcom Corporation <bcm-kernel-feedback-list@broadcom.com>
  * Copyright (C) 2012-2014 Broadcom Corporation
  *
  * This program is free software; you can redistribute it and/or
@@ -17,7 +20,7 @@
 #include <linux/gpio.h>
 #include <linux/of_device.h>
 #include <linux/of_irq.h>
-#include <linux/module.h>
+#include <linux/init.h>
 #include <linux/irqdomain.h>
 #include <linux/irqchip/chained_irq.h>
 
@@ -502,8 +505,6 @@ static struct of_device_id const bcm_kona_gpio_of_match[] = {
 	{}
 };
 
-MODULE_DEVICE_TABLE(of, bcm_kona_gpio_of_match);
-
 /*
  * This lock class tells lockdep that GPIO irqs are in a different
  * category than their parents, so it won't report false recursion.
@@ -659,9 +660,4 @@ static struct platform_driver bcm_kona_gpio_driver = {
 	},
 	.probe = bcm_kona_gpio_probe,
 };
-
-module_platform_driver(bcm_kona_gpio_driver);
-
-MODULE_AUTHOR("Broadcom Corporation <bcm-kernel-feedback-list@broadcom.com>");
-MODULE_DESCRIPTION("Broadcom Kona GPIO Driver");
-MODULE_LICENSE("GPL v2");
+builtin_platform_driver(bcm_kona_gpio_driver);
-- 
2.6.1

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 2/9] drivers/gpio: make gpio-mb86s7x.c driver explicitly non-modular
  2016-03-27 15:44 [PATCH 0/9] gpio: batch #1: remove modular usage from non-modular drivers Paul Gortmaker
  2016-03-27 15:44 ` [PATCH 1/9] drivers/gpio: make gpio-bcm-kona.c explicitly non-modular Paul Gortmaker
@ 2016-03-27 15:44 ` Paul Gortmaker
  2016-03-31 13:01   ` Linus Walleij
  2016-03-27 15:44 ` [PATCH 3/9] drivers/gpio: make gpio-mc9s08dz60.c " Paul Gortmaker
                   ` (7 subsequent siblings)
  9 siblings, 1 reply; 21+ messages in thread
From: Paul Gortmaker @ 2016-03-27 15:44 UTC (permalink / raw)
  To: linux-kernel; +Cc: Paul Gortmaker, Linus Walleij, Alexandre Courbot, linux-gpio

The Kconfig for this driver is currently:

config GPIO_MB86S7X
        bool "GPIO support for Fujitsu MB86S7x Platforms"

...meaning that it currently is not being built as a module by anyone.
Lets remove the couple traces of modularity, so that when reading the
driver there is no 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 also delete the MODULE_LICENSE tag etc. since all that information
is already contained at the top of the file in the comments.

Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Alexandre Courbot <gnurou@gmail.com>
Cc: linux-gpio@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 drivers/gpio/gpio-mb86s7x.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/gpio/gpio-mb86s7x.c b/drivers/gpio/gpio-mb86s7x.c
index 7fffc1d6c055..d69bd24b241c 100644
--- a/drivers/gpio/gpio-mb86s7x.c
+++ b/drivers/gpio/gpio-mb86s7x.c
@@ -17,7 +17,6 @@
 #include <linux/io.h>
 #include <linux/init.h>
 #include <linux/clk.h>
-#include <linux/module.h>
 #include <linux/err.h>
 #include <linux/errno.h>
 #include <linux/ioport.h>
@@ -210,7 +209,6 @@ static const struct of_device_id mb86s70_gpio_dt_ids[] = {
 	{ .compatible = "fujitsu,mb86s70-gpio" },
 	{ /* sentinel */ }
 };
-MODULE_DEVICE_TABLE(of, mb86s70_gpio_dt_ids);
 
 static struct platform_driver mb86s70_gpio_driver = {
 	.driver = {
@@ -225,8 +223,4 @@ static int __init mb86s70_gpio_init(void)
 {
 	return platform_driver_register(&mb86s70_gpio_driver);
 }
-module_init(mb86s70_gpio_init);
-
-MODULE_DESCRIPTION("MB86S7x GPIO Driver");
-MODULE_ALIAS("platform:mb86s70-gpio");
-MODULE_LICENSE("GPL");
+device_initcall(mb86s70_gpio_init);
-- 
2.6.1

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 3/9] drivers/gpio: make gpio-mc9s08dz60.c explicitly non-modular
  2016-03-27 15:44 [PATCH 0/9] gpio: batch #1: remove modular usage from non-modular drivers Paul Gortmaker
  2016-03-27 15:44 ` [PATCH 1/9] drivers/gpio: make gpio-bcm-kona.c explicitly non-modular Paul Gortmaker
  2016-03-27 15:44 ` [PATCH 2/9] drivers/gpio: make gpio-mb86s7x.c driver " Paul Gortmaker
@ 2016-03-27 15:44 ` Paul Gortmaker
  2016-03-31 13:02   ` Linus Walleij
  2016-03-27 15:44 ` [PATCH 4/9] drivers/gpio: make gpio-moxart.c " Paul Gortmaker
                   ` (6 subsequent siblings)
  9 siblings, 1 reply; 21+ messages in thread
From: Paul Gortmaker @ 2016-03-27 15:44 UTC (permalink / raw)
  To: linux-kernel
  Cc: Paul Gortmaker, Linus Walleij, Alexandre Courbot, Wu Guoxing, linux-gpio

The Kconfig currently controlling compilation of this code is:

drivers/gpio/Kconfig:config GPIO_MC9S08DZ60
drivers/gpio/Kconfig:   bool "MX35 3DS BOARD MC9S08DZ60 GPIO functions"

...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: Linus Walleij <linus.walleij@linaro.org>
Cc: Alexandre Courbot <gnurou@gmail.com>
Cc: Wu Guoxing <b39297@freescale.com>
Cc: linux-gpio@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 drivers/gpio/gpio-mc9s08dz60.c | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/drivers/gpio/gpio-mc9s08dz60.c b/drivers/gpio/gpio-mc9s08dz60.c
index 14f252f9eb29..2fcad5b9cca5 100644
--- a/drivers/gpio/gpio-mc9s08dz60.c
+++ b/drivers/gpio/gpio-mc9s08dz60.c
@@ -15,7 +15,7 @@
  */
 
 #include <linux/kernel.h>
-#include <linux/module.h>
+#include <linux/init.h>
 #include <linux/slab.h>
 #include <linux/i2c.h>
 #include <linux/gpio.h>
@@ -111,8 +111,6 @@ static const struct i2c_device_id mc9s08dz60_id[] = {
 	{},
 };
 
-MODULE_DEVICE_TABLE(i2c, mc9s08dz60_id);
-
 static struct i2c_driver mc9s08dz60_i2c_driver = {
 	.driver = {
 		.name = "mc9s08dz60",
@@ -120,10 +118,4 @@ static struct i2c_driver mc9s08dz60_i2c_driver = {
 	.probe = mc9s08dz60_probe,
 	.id_table = mc9s08dz60_id,
 };
-
-module_i2c_driver(mc9s08dz60_i2c_driver);
-
-MODULE_AUTHOR("Freescale Semiconductor, Inc. "
-		"Wu Guoxing <b39297@freescale.com>");
-MODULE_DESCRIPTION("mc9s08dz60 gpio function on mx35 3ds board");
-MODULE_LICENSE("GPL v2");
+builtin_i2c_driver(mc9s08dz60_i2c_driver);
-- 
2.6.1

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 4/9] drivers/gpio: make gpio-moxart.c explicitly non-modular
  2016-03-27 15:44 [PATCH 0/9] gpio: batch #1: remove modular usage from non-modular drivers Paul Gortmaker
                   ` (2 preceding siblings ...)
  2016-03-27 15:44 ` [PATCH 3/9] drivers/gpio: make gpio-mc9s08dz60.c " Paul Gortmaker
@ 2016-03-27 15:44 ` Paul Gortmaker
  2016-03-31 13:03   ` Linus Walleij
  2016-03-27 15:44 ` [PATCH 5/9] drivers/gpio: make gpio-mvebu.c " Paul Gortmaker
                   ` (5 subsequent siblings)
  9 siblings, 1 reply; 21+ messages in thread
From: Paul Gortmaker @ 2016-03-27 15:44 UTC (permalink / raw)
  To: linux-kernel
  Cc: Paul Gortmaker, Jonas Jensen, Linus Walleij, Alexandre Courbot,
	linux-gpio

The Kconfig currently controlling compilation of this code is:

drivers/gpio/Kconfig:config GPIO_MOXART
drivers/gpio/Kconfig:   bool "MOXART GPIO support"

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

Lets remove the couple traces of modular references so that when reading
the driver there is no doubt it is builtin-only.

Since module_platform_driver() uses the same init level priority as
builtin_platform_driver() the init ordering remains unchanged with
this commit.

We also delete the MODULE_LICENSE tag etc. since all that information
is already contained at the top of the file in the comments.

We don't replace module.h with init.h since the file already has that.

Cc: Jonas Jensen <jonas.jensen@gmail.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Alexandre Courbot <gnurou@gmail.com>
Cc: linux-gpio@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 drivers/gpio/gpio-moxart.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/gpio/gpio-moxart.c b/drivers/gpio/gpio-moxart.c
index f02d0b490978..d58d38906ba6 100644
--- a/drivers/gpio/gpio-moxart.c
+++ b/drivers/gpio/gpio-moxart.c
@@ -15,7 +15,6 @@
 #include <linux/irq.h>
 #include <linux/io.h>
 #include <linux/platform_device.h>
-#include <linux/module.h>
 #include <linux/of_address.h>
 #include <linux/of_gpio.h>
 #include <linux/pinctrl/consumer.h>
@@ -82,8 +81,4 @@ static struct platform_driver moxart_gpio_driver = {
 	},
 	.probe	= moxart_gpio_probe,
 };
-module_platform_driver(moxart_gpio_driver);
-
-MODULE_DESCRIPTION("MOXART GPIO chip driver");
-MODULE_LICENSE("GPL");
-MODULE_AUTHOR("Jonas Jensen <jonas.jensen@gmail.com>");
+builtin_platform_driver(moxart_gpio_driver);
-- 
2.6.1

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 5/9] drivers/gpio: make gpio-mvebu.c explicitly non-modular
  2016-03-27 15:44 [PATCH 0/9] gpio: batch #1: remove modular usage from non-modular drivers Paul Gortmaker
                   ` (3 preceding siblings ...)
  2016-03-27 15:44 ` [PATCH 4/9] drivers/gpio: make gpio-moxart.c " Paul Gortmaker
@ 2016-03-27 15:44 ` Paul Gortmaker
  2016-03-31 13:05   ` Linus Walleij
  2016-03-27 15:44 ` [PATCH 6/9] drivers/gpio: make gpio-pl061.c " Paul Gortmaker
                   ` (4 subsequent siblings)
  9 siblings, 1 reply; 21+ messages in thread
From: Paul Gortmaker @ 2016-03-27 15:44 UTC (permalink / raw)
  To: linux-kernel; +Cc: Paul Gortmaker, Linus Walleij, Alexandre Courbot, linux-gpio

The Kconfig currently controlling compilation of this code is:

drivers/gpio/Kconfig:config GPIO_MVEBU
drivers/gpio/Kconfig:   def_bool y

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

Lets remove the couple traces of modularity so that when reading the
driver there is no doubt it is builtin-only.

Since module_platform_driver() uses the same init level priority as
builtin_platform_driver() the init ordering remains unchanged with
this commit.

Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code.

Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Alexandre Courbot <gnurou@gmail.com>
Cc: linux-gpio@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 drivers/gpio/gpio-mvebu.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/gpio/gpio-mvebu.c b/drivers/gpio/gpio-mvebu.c
index 11c6582ef0a6..cd5dc27320a2 100644
--- a/drivers/gpio/gpio-mvebu.c
+++ b/drivers/gpio/gpio-mvebu.c
@@ -34,7 +34,7 @@
  */
 
 #include <linux/err.h>
-#include <linux/module.h>
+#include <linux/init.h>
 #include <linux/gpio.h>
 #include <linux/irq.h>
 #include <linux/slab.h>
@@ -557,7 +557,6 @@ static const struct of_device_id mvebu_gpio_of_match[] = {
 		/* sentinel */
 	},
 };
-MODULE_DEVICE_TABLE(of, mvebu_gpio_of_match);
 
 static int mvebu_gpio_suspend(struct platform_device *pdev, pm_message_t state)
 {
@@ -838,4 +837,4 @@ static struct platform_driver mvebu_gpio_driver = {
 	.suspend        = mvebu_gpio_suspend,
 	.resume         = mvebu_gpio_resume,
 };
-module_platform_driver(mvebu_gpio_driver);
+builtin_platform_driver(mvebu_gpio_driver);
-- 
2.6.1

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 6/9] drivers/gpio: make gpio-pl061.c explicitly non-modular
  2016-03-27 15:44 [PATCH 0/9] gpio: batch #1: remove modular usage from non-modular drivers Paul Gortmaker
                   ` (4 preceding siblings ...)
  2016-03-27 15:44 ` [PATCH 5/9] drivers/gpio: make gpio-mvebu.c " Paul Gortmaker
@ 2016-03-27 15:44 ` Paul Gortmaker
  2016-03-27 17:40   ` Baruch Siach
  2016-03-31 13:06   ` Linus Walleij
  2016-03-27 15:44 ` [PATCH 7/9] drivers/gpio: make gpio-sta2x11.c " Paul Gortmaker
                   ` (3 subsequent siblings)
  9 siblings, 2 replies; 21+ messages in thread
From: Paul Gortmaker @ 2016-03-27 15:44 UTC (permalink / raw)
  To: linux-kernel
  Cc: Paul Gortmaker, Linus Walleij, Alexandre Courbot, Baruch Siach,
	linux-gpio

The Kconfig for this driver is currently:

config GPIO_PL061
        bool "PrimeCell PL061 GPIO support"

...meaning that it currently is not being built as a module by anyone.
Lets remove the couple traces of modularity, so that when reading the
driver there is no 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 also delete the MODULE_LICENSE tag etc. since all that information
was (or is now) contained at the top of the file in the comments.

Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Alexandre Courbot <gnurou@gmail.com>
Cc: Baruch Siach <baruch@tkos.co.il>
Cc: linux-gpio@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 drivers/gpio/gpio-pl061.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/gpio/gpio-pl061.c b/drivers/gpio/gpio-pl061.c
index 5cb38212bbc0..9afb415a5d24 100644
--- a/drivers/gpio/gpio-pl061.c
+++ b/drivers/gpio/gpio-pl061.c
@@ -1,6 +1,8 @@
 /*
  * Copyright (C) 2008, 2009 Provigent Ltd.
  *
+ * Author: Baruch Siach <baruch@tkos.co.il>
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
@@ -11,7 +13,7 @@
  */
 #include <linux/spinlock.h>
 #include <linux/errno.h>
-#include <linux/module.h>
+#include <linux/init.h>
 #include <linux/io.h>
 #include <linux/ioport.h>
 #include <linux/interrupt.h>
@@ -429,8 +431,6 @@ static struct amba_id pl061_ids[] = {
 	{ 0, 0 },
 };
 
-MODULE_DEVICE_TABLE(amba, pl061_ids);
-
 static struct amba_driver pl061_gpio_driver = {
 	.drv = {
 		.name	= "pl061_gpio",
@@ -446,8 +446,4 @@ static int __init pl061_gpio_init(void)
 {
 	return amba_driver_register(&pl061_gpio_driver);
 }
-module_init(pl061_gpio_init);
-
-MODULE_AUTHOR("Baruch Siach <baruch@tkos.co.il>");
-MODULE_DESCRIPTION("PL061 GPIO driver");
-MODULE_LICENSE("GPL");
+device_initcall(pl061_gpio_init);
-- 
2.6.1

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 7/9] drivers/gpio: make gpio-sta2x11.c explicitly non-modular
  2016-03-27 15:44 [PATCH 0/9] gpio: batch #1: remove modular usage from non-modular drivers Paul Gortmaker
                   ` (5 preceding siblings ...)
  2016-03-27 15:44 ` [PATCH 6/9] drivers/gpio: make gpio-pl061.c " Paul Gortmaker
@ 2016-03-27 15:44 ` Paul Gortmaker
  2016-03-31 13:08   ` Linus Walleij
  2016-03-27 15:44 ` [PATCH 8/9] drivers/gpio: make gpio-xgene.c " Paul Gortmaker
                   ` (2 subsequent siblings)
  9 siblings, 1 reply; 21+ messages in thread
From: Paul Gortmaker @ 2016-03-27 15:44 UTC (permalink / raw)
  To: linux-kernel; +Cc: Paul Gortmaker, Linus Walleij, Alexandre Courbot, linux-gpio

The Kconfig currently controlling compilation of this code is:

drivers/gpio/Kconfig:config GPIO_STA2X11
drivers/gpio/Kconfig:   bool "STA2x11/ConneXt GPIO support"

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

Lets remove the couple traces of modularity, so that when reading
the driver there is no doubt it is builtin-only.

Since module_platform_driver() uses the same init level priority as
builtin_platform_driver() the init ordering remains unchanged with
this commit.

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: Linus Walleij <linus.walleij@linaro.org>
Cc: Alexandre Courbot <gnurou@gmail.com>
Cc: linux-gpio@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 drivers/gpio/gpio-sta2x11.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/gpio/gpio-sta2x11.c b/drivers/gpio/gpio-sta2x11.c
index 0d5b8c525dd9..853ca23cad88 100644
--- a/drivers/gpio/gpio-sta2x11.c
+++ b/drivers/gpio/gpio-sta2x11.c
@@ -20,7 +20,7 @@
  *
  */
 
-#include <linux/module.h>
+#include <linux/init.h>
 #include <linux/kernel.h>
 #include <linux/slab.h>
 #include <linux/gpio.h>
@@ -432,8 +432,4 @@ static struct platform_driver sta2x11_gpio_platform_driver = {
 	},
 	.probe = gsta_probe,
 };
-
-module_platform_driver(sta2x11_gpio_platform_driver);
-
-MODULE_LICENSE("GPL v2");
-MODULE_DESCRIPTION("sta2x11_gpio GPIO driver");
+builtin_platform_driver(sta2x11_gpio_platform_driver);
-- 
2.6.1

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 8/9] drivers/gpio: make gpio-xgene.c explicitly non-modular
  2016-03-27 15:44 [PATCH 0/9] gpio: batch #1: remove modular usage from non-modular drivers Paul Gortmaker
                   ` (6 preceding siblings ...)
  2016-03-27 15:44 ` [PATCH 7/9] drivers/gpio: make gpio-sta2x11.c " Paul Gortmaker
@ 2016-03-27 15:44 ` Paul Gortmaker
  2016-03-31 13:09   ` Linus Walleij
  2016-03-27 15:44 ` [PATCH 9/9] drivers/gpio: make gpio-zx.c " Paul Gortmaker
  2016-03-31 13:12 ` [PATCH 0/9] gpio: batch #1: remove modular usage from non-modular drivers Linus Walleij
  9 siblings, 1 reply; 21+ messages in thread
From: Paul Gortmaker @ 2016-03-27 15:44 UTC (permalink / raw)
  To: linux-kernel
  Cc: Paul Gortmaker, Feng Kan, Linus Walleij, Alexandre Courbot, linux-gpio

The Kconfig currently controlling compilation of this code is:

drivers/gpio/Kconfig:config GPIO_XGENE
drivers/gpio/Kconfig:   bool "APM X-Gene GPIO controller support"

...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_platform_driver() uses the same init level priority as
builtin_platform_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: Feng Kan <fkan@apm.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Alexandre Courbot <gnurou@gmail.com>
Cc: linux-gpio@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 drivers/gpio/gpio-xgene.c | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/drivers/gpio/gpio-xgene.c b/drivers/gpio/gpio-xgene.c
index c0aa387664bf..4193502fe3be 100644
--- a/drivers/gpio/gpio-xgene.c
+++ b/drivers/gpio/gpio-xgene.c
@@ -17,7 +17,6 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/io.h>
@@ -211,7 +210,6 @@ static const struct of_device_id xgene_gpio_of_match[] = {
 	{ .compatible = "apm,xgene-gpio", },
 	{},
 };
-MODULE_DEVICE_TABLE(of, xgene_gpio_of_match);
 
 static struct platform_driver xgene_gpio_driver = {
 	.driver = {
@@ -221,9 +219,4 @@ static struct platform_driver xgene_gpio_driver = {
 	},
 	.probe = xgene_gpio_probe,
 };
-
-module_platform_driver(xgene_gpio_driver);
-
-MODULE_AUTHOR("Feng Kan <fkan@apm.com>");
-MODULE_DESCRIPTION("APM X-Gene GPIO driver");
-MODULE_LICENSE("GPL");
+builtin_platform_driver(xgene_gpio_driver);
-- 
2.6.1

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 9/9] drivers/gpio: make gpio-zx.c explicitly non-modular
  2016-03-27 15:44 [PATCH 0/9] gpio: batch #1: remove modular usage from non-modular drivers Paul Gortmaker
                   ` (7 preceding siblings ...)
  2016-03-27 15:44 ` [PATCH 8/9] drivers/gpio: make gpio-xgene.c " Paul Gortmaker
@ 2016-03-27 15:44 ` Paul Gortmaker
  2016-03-31 13:11   ` Linus Walleij
  2016-03-31 13:12 ` [PATCH 0/9] gpio: batch #1: remove modular usage from non-modular drivers Linus Walleij
  9 siblings, 1 reply; 21+ messages in thread
From: Paul Gortmaker @ 2016-03-27 15:44 UTC (permalink / raw)
  To: linux-kernel
  Cc: Paul Gortmaker, Linus Walleij, Alexandre Courbot, Jun Nie, linux-gpio

The Kconfig currently controlling compilation of this code is:

config GPIO_ZX
        bool "ZTE ZX GPIO support"

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

Lets remove the couple traces of modularity so that when reading the
driver there is no doubt it is builtin-only.

Since module_platform_driver() uses the same init level priority as
builtin_platform_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
was (or is now) contained at the top of the file in the comments.

Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Alexandre Courbot <gnurou@gmail.com>
Cc: Jun Nie <jun.nie@linaro.org>
Cc: linux-gpio@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 drivers/gpio/gpio-zx.c | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/drivers/gpio/gpio-zx.c b/drivers/gpio/gpio-zx.c
index 47c79fa65670..93de8be0d885 100644
--- a/drivers/gpio/gpio-zx.c
+++ b/drivers/gpio/gpio-zx.c
@@ -1,4 +1,8 @@
 /*
+ * ZTE ZX296702 GPIO driver
+ *
+ * Author: Jun Nie <jun.nie@linaro.org>
+ *
  * Copyright (C) 2015 Linaro Ltd.
  *
  * This program is free software; you can redistribute it and/or modify
@@ -10,7 +14,7 @@
 #include <linux/errno.h>
 #include <linux/gpio/driver.h>
 #include <linux/irqchip/chained_irq.h>
-#include <linux/module.h>
+#include <linux/init.h>
 #include <linux/of.h>
 #include <linux/pinctrl/consumer.h>
 #include <linux/platform_device.h>
@@ -282,7 +286,6 @@ static const struct of_device_id zx_gpio_match[] = {
 	},
 	{ },
 };
-MODULE_DEVICE_TABLE(of, zx_gpio_match);
 
 static struct platform_driver zx_gpio_driver = {
 	.probe		= zx_gpio_probe,
@@ -291,9 +294,4 @@ static struct platform_driver zx_gpio_driver = {
 		.of_match_table = of_match_ptr(zx_gpio_match),
 	},
 };
-
-module_platform_driver(zx_gpio_driver)
-
-MODULE_AUTHOR("Jun Nie <jun.nie@linaro.org>");
-MODULE_DESCRIPTION("ZTE ZX296702 GPIO driver");
-MODULE_LICENSE("GPL");
+builtin_platform_driver(zx_gpio_driver)
-- 
2.6.1

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* Re: [PATCH 6/9] drivers/gpio: make gpio-pl061.c explicitly non-modular
  2016-03-27 15:44 ` [PATCH 6/9] drivers/gpio: make gpio-pl061.c " Paul Gortmaker
@ 2016-03-27 17:40   ` Baruch Siach
  2016-03-31 13:06   ` Linus Walleij
  1 sibling, 0 replies; 21+ messages in thread
From: Baruch Siach @ 2016-03-27 17:40 UTC (permalink / raw)
  To: Paul Gortmaker; +Cc: linux-kernel, Linus Walleij, Alexandre Courbot, linux-gpio

Hi Paul,

On Sun, Mar 27, 2016 at 11:44:46AM -0400, Paul Gortmaker wrote:
> The Kconfig for this driver is currently:
> 
> config GPIO_PL061
>         bool "PrimeCell PL061 GPIO support"
> 
> ...meaning that it currently is not being built as a module by anyone.
> Lets remove the couple traces of modularity, so that when reading the
> driver there is no 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 also delete the MODULE_LICENSE tag etc. since all that information
> was (or is now) contained at the top of the file in the comments.
> 
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: Alexandre Courbot <gnurou@gmail.com>
> Cc: Baruch Siach <baruch@tkos.co.il>
> Cc: linux-gpio@vger.kernel.org
> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>

Acked-by: Baruch Siach <baruch@tkos.co.il>

Thanks,
baruch

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch@tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 1/9] drivers/gpio: make gpio-bcm-kona.c explicitly non-modular
  2016-03-27 15:44 ` [PATCH 1/9] drivers/gpio: make gpio-bcm-kona.c explicitly non-modular Paul Gortmaker
@ 2016-03-31 10:01   ` Linus Walleij
  0 siblings, 0 replies; 21+ messages in thread
From: Linus Walleij @ 2016-03-31 10:01 UTC (permalink / raw)
  To: Paul Gortmaker
  Cc: linux-kernel, Ray Jui, Alexandre Courbot,
	bcm-kernel-feedback-list, linux-gpio

On Sun, Mar 27, 2016 at 5:44 PM, Paul Gortmaker
<paul.gortmaker@windriver.com> wrote:

> The Kconfig currently controlling compilation of this code is:
>
> config GPIO_BCM_KONA
>         bool "Broadcom Kona GPIO"
>
> ...meaning that it currently is not being built as a module by anyone.
>
> Lets remove the couple traces of modularity so that when reading the
> driver there is no doubt it is builtin-only.
>
> Since module_platform_driver() uses the same init level priority as
> builtin_platform_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
> was (or is now) contained at the top of the file in the comments.
>
> Cc: Ray Jui <rjui@broadcom.com>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: Alexandre Courbot <gnurou@gmail.com>
> Cc: bcm-kernel-feedback-list@broadcom.com
> Cc: linux-gpio@vger.kernel.org
> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>

Patch applied.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 2/9] drivers/gpio: make gpio-mb86s7x.c driver explicitly non-modular
  2016-03-27 15:44 ` [PATCH 2/9] drivers/gpio: make gpio-mb86s7x.c driver " Paul Gortmaker
@ 2016-03-31 13:01   ` Linus Walleij
  0 siblings, 0 replies; 21+ messages in thread
From: Linus Walleij @ 2016-03-31 13:01 UTC (permalink / raw)
  To: Paul Gortmaker; +Cc: linux-kernel, Alexandre Courbot, linux-gpio

On Sun, Mar 27, 2016 at 5:44 PM, Paul Gortmaker
<paul.gortmaker@windriver.com> wrote:

> The Kconfig for this driver is currently:
>
> config GPIO_MB86S7X
>         bool "GPIO support for Fujitsu MB86S7x Platforms"
>
> ...meaning that it currently is not being built as a module by anyone.
> Lets remove the couple traces of modularity, so that when reading the
> driver there is no 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 also delete the MODULE_LICENSE tag etc. since all that information
> is already contained at the top of the file in the comments.
>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: Alexandre Courbot <gnurou@gmail.com>
> Cc: linux-gpio@vger.kernel.org
> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>

Patch applied.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 3/9] drivers/gpio: make gpio-mc9s08dz60.c explicitly non-modular
  2016-03-27 15:44 ` [PATCH 3/9] drivers/gpio: make gpio-mc9s08dz60.c " Paul Gortmaker
@ 2016-03-31 13:02   ` Linus Walleij
  0 siblings, 0 replies; 21+ messages in thread
From: Linus Walleij @ 2016-03-31 13:02 UTC (permalink / raw)
  To: Paul Gortmaker; +Cc: linux-kernel, Alexandre Courbot, Wu Guoxing, linux-gpio

On Sun, Mar 27, 2016 at 5:44 PM, Paul Gortmaker
<paul.gortmaker@windriver.com> wrote:

> The Kconfig currently controlling compilation of this code is:
>
> drivers/gpio/Kconfig:config GPIO_MC9S08DZ60
> drivers/gpio/Kconfig:   bool "MX35 3DS BOARD MC9S08DZ60 GPIO functions"
>
> ...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: Linus Walleij <linus.walleij@linaro.org>
> Cc: Alexandre Courbot <gnurou@gmail.com>
> Cc: Wu Guoxing <b39297@freescale.com>
> Cc: linux-gpio@vger.kernel.org
> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>

Patch applied.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 4/9] drivers/gpio: make gpio-moxart.c explicitly non-modular
  2016-03-27 15:44 ` [PATCH 4/9] drivers/gpio: make gpio-moxart.c " Paul Gortmaker
@ 2016-03-31 13:03   ` Linus Walleij
  0 siblings, 0 replies; 21+ messages in thread
From: Linus Walleij @ 2016-03-31 13:03 UTC (permalink / raw)
  To: Paul Gortmaker; +Cc: linux-kernel, Jonas Jensen, Alexandre Courbot, linux-gpio

On Sun, Mar 27, 2016 at 5:44 PM, Paul Gortmaker
<paul.gortmaker@windriver.com> wrote:

> The Kconfig currently controlling compilation of this code is:
>
> drivers/gpio/Kconfig:config GPIO_MOXART
> drivers/gpio/Kconfig:   bool "MOXART GPIO support"
>
> ...meaning that it currently is not being built as a module by anyone.
>
> Lets remove the couple traces of modular references so that when reading
> the driver there is no doubt it is builtin-only.
>
> Since module_platform_driver() uses the same init level priority as
> builtin_platform_driver() the init ordering remains unchanged with
> this commit.
>
> We also delete the MODULE_LICENSE tag etc. since all that information
> is already contained at the top of the file in the comments.
>
> We don't replace module.h with init.h since the file already has that.
>
> Cc: Jonas Jensen <jonas.jensen@gmail.com>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: Alexandre Courbot <gnurou@gmail.com>
> Cc: linux-gpio@vger.kernel.org
> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>

Patch applied.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 5/9] drivers/gpio: make gpio-mvebu.c explicitly non-modular
  2016-03-27 15:44 ` [PATCH 5/9] drivers/gpio: make gpio-mvebu.c " Paul Gortmaker
@ 2016-03-31 13:05   ` Linus Walleij
  0 siblings, 0 replies; 21+ messages in thread
From: Linus Walleij @ 2016-03-31 13:05 UTC (permalink / raw)
  To: Paul Gortmaker; +Cc: linux-kernel, Alexandre Courbot, linux-gpio

On Sun, Mar 27, 2016 at 5:44 PM, Paul Gortmaker
<paul.gortmaker@windriver.com> wrote:

> The Kconfig currently controlling compilation of this code is:
>
> drivers/gpio/Kconfig:config GPIO_MVEBU
> drivers/gpio/Kconfig:   def_bool y
>
> ...meaning that it currently is not being built as a module by anyone.
>
> Lets remove the couple traces of modularity so that when reading the
> driver there is no doubt it is builtin-only.
>
> Since module_platform_driver() uses the same init level priority as
> builtin_platform_driver() the init ordering remains unchanged with
> this commit.
>
> Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code.
>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: Alexandre Courbot <gnurou@gmail.com>
> Cc: linux-gpio@vger.kernel.org
> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>

Patch applied.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 6/9] drivers/gpio: make gpio-pl061.c explicitly non-modular
  2016-03-27 15:44 ` [PATCH 6/9] drivers/gpio: make gpio-pl061.c " Paul Gortmaker
  2016-03-27 17:40   ` Baruch Siach
@ 2016-03-31 13:06   ` Linus Walleij
  1 sibling, 0 replies; 21+ messages in thread
From: Linus Walleij @ 2016-03-31 13:06 UTC (permalink / raw)
  To: Paul Gortmaker; +Cc: linux-kernel, Alexandre Courbot, Baruch Siach, linux-gpio

On Sun, Mar 27, 2016 at 5:44 PM, Paul Gortmaker
<paul.gortmaker@windriver.com> wrote:

> The Kconfig for this driver is currently:
>
> config GPIO_PL061
>         bool "PrimeCell PL061 GPIO support"
>
> ...meaning that it currently is not being built as a module by anyone.
> Lets remove the couple traces of modularity, so that when reading the
> driver there is no 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 also delete the MODULE_LICENSE tag etc. since all that information
> was (or is now) contained at the top of the file in the comments.
>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: Alexandre Courbot <gnurou@gmail.com>
> Cc: Baruch Siach <baruch@tkos.co.il>
> Cc: linux-gpio@vger.kernel.org
> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>

Patch applied with Baruch's ACK.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 7/9] drivers/gpio: make gpio-sta2x11.c explicitly non-modular
  2016-03-27 15:44 ` [PATCH 7/9] drivers/gpio: make gpio-sta2x11.c " Paul Gortmaker
@ 2016-03-31 13:08   ` Linus Walleij
  0 siblings, 0 replies; 21+ messages in thread
From: Linus Walleij @ 2016-03-31 13:08 UTC (permalink / raw)
  To: Paul Gortmaker; +Cc: linux-kernel, Alexandre Courbot, linux-gpio

On Sun, Mar 27, 2016 at 5:44 PM, Paul Gortmaker
<paul.gortmaker@windriver.com> wrote:

> The Kconfig currently controlling compilation of this code is:
>
> drivers/gpio/Kconfig:config GPIO_STA2X11
> drivers/gpio/Kconfig:   bool "STA2x11/ConneXt GPIO support"
>
> ...meaning that it currently is not being built as a module by anyone.
>
> Lets remove the couple traces of modularity, so that when reading
> the driver there is no doubt it is builtin-only.
>
> Since module_platform_driver() uses the same init level priority as
> builtin_platform_driver() the init ordering remains unchanged with
> this commit.
>
> 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: Linus Walleij <linus.walleij@linaro.org>
> Cc: Alexandre Courbot <gnurou@gmail.com>
> Cc: linux-gpio@vger.kernel.org
> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>

Patch applied.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 8/9] drivers/gpio: make gpio-xgene.c explicitly non-modular
  2016-03-27 15:44 ` [PATCH 8/9] drivers/gpio: make gpio-xgene.c " Paul Gortmaker
@ 2016-03-31 13:09   ` Linus Walleij
  0 siblings, 0 replies; 21+ messages in thread
From: Linus Walleij @ 2016-03-31 13:09 UTC (permalink / raw)
  To: Paul Gortmaker; +Cc: linux-kernel, Feng Kan, Alexandre Courbot, linux-gpio

On Sun, Mar 27, 2016 at 5:44 PM, Paul Gortmaker
<paul.gortmaker@windriver.com> wrote:

> The Kconfig currently controlling compilation of this code is:
>
> drivers/gpio/Kconfig:config GPIO_XGENE
> drivers/gpio/Kconfig:   bool "APM X-Gene GPIO controller support"
>
> ...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_platform_driver() uses the same init level priority as
> builtin_platform_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: Feng Kan <fkan@apm.com>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: Alexandre Courbot <gnurou@gmail.com>
> Cc: linux-gpio@vger.kernel.org
> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>

Patch applied.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 9/9] drivers/gpio: make gpio-zx.c explicitly non-modular
  2016-03-27 15:44 ` [PATCH 9/9] drivers/gpio: make gpio-zx.c " Paul Gortmaker
@ 2016-03-31 13:11   ` Linus Walleij
  0 siblings, 0 replies; 21+ messages in thread
From: Linus Walleij @ 2016-03-31 13:11 UTC (permalink / raw)
  To: Paul Gortmaker; +Cc: linux-kernel, Alexandre Courbot, Jun Nie, linux-gpio

On Sun, Mar 27, 2016 at 5:44 PM, Paul Gortmaker
<paul.gortmaker@windriver.com> wrote:

> The Kconfig currently controlling compilation of this code is:
>
> config GPIO_ZX
>         bool "ZTE ZX GPIO support"
>
> ...meaning that it currently is not being built as a module by anyone.
>
> Lets remove the couple traces of modularity so that when reading the
> driver there is no doubt it is builtin-only.
>
> Since module_platform_driver() uses the same init level priority as
> builtin_platform_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
> was (or is now) contained at the top of the file in the comments.
>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: Alexandre Courbot <gnurou@gmail.com>
> Cc: Jun Nie <jun.nie@linaro.org>
> Cc: linux-gpio@vger.kernel.org
> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>

Patch applied.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 0/9] gpio: batch #1: remove modular usage from non-modular drivers
  2016-03-27 15:44 [PATCH 0/9] gpio: batch #1: remove modular usage from non-modular drivers Paul Gortmaker
                   ` (8 preceding siblings ...)
  2016-03-27 15:44 ` [PATCH 9/9] drivers/gpio: make gpio-zx.c " Paul Gortmaker
@ 2016-03-31 13:12 ` Linus Walleij
  9 siblings, 0 replies; 21+ messages in thread
From: Linus Walleij @ 2016-03-31 13:12 UTC (permalink / raw)
  To: Paul Gortmaker
  Cc: linux-kernel, Alexandre Courbot, Baruch Siach,
	bcm-kernel-feedback-list, Feng Kan, Jonas Jensen, Jun Nie,
	Ray Jui, Wu Guoxing, linux-gpio

On Sun, Mar 27, 2016 at 5:44 PM, Paul Gortmaker
<paul.gortmaker@windriver.com> wrote:

> I will send #2 once this #1 is finalized/merged and #3 once #2 is merged.

I merged the first set.

Thank you for your tireless efforts in cleaning upp this mess.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2016-03-31 13:12 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-27 15:44 [PATCH 0/9] gpio: batch #1: remove modular usage from non-modular drivers Paul Gortmaker
2016-03-27 15:44 ` [PATCH 1/9] drivers/gpio: make gpio-bcm-kona.c explicitly non-modular Paul Gortmaker
2016-03-31 10:01   ` Linus Walleij
2016-03-27 15:44 ` [PATCH 2/9] drivers/gpio: make gpio-mb86s7x.c driver " Paul Gortmaker
2016-03-31 13:01   ` Linus Walleij
2016-03-27 15:44 ` [PATCH 3/9] drivers/gpio: make gpio-mc9s08dz60.c " Paul Gortmaker
2016-03-31 13:02   ` Linus Walleij
2016-03-27 15:44 ` [PATCH 4/9] drivers/gpio: make gpio-moxart.c " Paul Gortmaker
2016-03-31 13:03   ` Linus Walleij
2016-03-27 15:44 ` [PATCH 5/9] drivers/gpio: make gpio-mvebu.c " Paul Gortmaker
2016-03-31 13:05   ` Linus Walleij
2016-03-27 15:44 ` [PATCH 6/9] drivers/gpio: make gpio-pl061.c " Paul Gortmaker
2016-03-27 17:40   ` Baruch Siach
2016-03-31 13:06   ` Linus Walleij
2016-03-27 15:44 ` [PATCH 7/9] drivers/gpio: make gpio-sta2x11.c " Paul Gortmaker
2016-03-31 13:08   ` Linus Walleij
2016-03-27 15:44 ` [PATCH 8/9] drivers/gpio: make gpio-xgene.c " Paul Gortmaker
2016-03-31 13:09   ` Linus Walleij
2016-03-27 15:44 ` [PATCH 9/9] drivers/gpio: make gpio-zx.c " Paul Gortmaker
2016-03-31 13:11   ` Linus Walleij
2016-03-31 13:12 ` [PATCH 0/9] gpio: batch #1: remove modular usage from non-modular drivers Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).