linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] gpio: batch #3: remove modular code from non-modular drivers
@ 2016-05-09 23:59 Paul Gortmaker
  2016-05-09 23:59 ` [PATCH 1/4] gpio: sodaville: make it explicitly non-modular Paul Gortmaker
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Paul Gortmaker @ 2016-05-09 23:59 UTC (permalink / raw)
  To: linux-kernel
  Cc: Paul Gortmaker, Alexandre Courbot, Fabian Vogt, Hans J . Koch,
	Linus Walleij, linux-gpio, Rabin Vincent

For GPIO, I'd divided up the the audit of modular usage in non-modular
drivers into three categories to ease review and limit the batch size.
Group #1 & #2 have been submitted and merged ; this here is group #3.

The breakdown of the three groups was 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.

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.

Since this is the #3 of 3, an additional bind comment is warranted.
One could argue that the suppress bind is overkill, since it isn't used
by all non-modular drivers everywhere, but it does ensure that anyone
who was manually trying to (ab)use it with _these_ drivers gets a clear
signal that it was never meant to be used like that.

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.

There are no initcall level changes here; everything was at the level
of device_initcall and remains so, by using the builtin equivalents.

I fixed up the shortlogs in this lot to match the existing gpio shortlog
format (no "device/" in the prefix, etc.) -- apologies for not catching
that for the earlier lot of commits in #1 and #2.

Build tested for 5-6 different key arch on today's linux-next to ensure
no silly typos crept in.

There is one remaining trivial bool ---> tristate gpio conversion I have to
send that didn't fit #1/#2/#3, but getting these groups done is 99% of it,
so thanks in advance for handling these and getting them off of my queue.

Paul.
---

Cc: Alexandre Courbot <gnurou@gmail.com>
Cc: Fabian Vogt <fabian@ritter-vogt.de>
Cc: Hans J. Koch <hjk@linutronix.de>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: linux-gpio@vger.kernel.org
Cc: Rabin Vincent <rabin.vincent@stericsson.com>

Paul Gortmaker (4):
  gpio: sodaville: make it explicitly non-modular
  gpio: stmpe: make it explicitly non-modular
  gpio: timberdale: make it explicitly non-modular
  gpio: zevio: make it explicitly non-modular

 drivers/gpio/gpio-sodaville.c  | 28 ++++++----------------------
 drivers/gpio/gpio-stmpe.c      | 31 +++++--------------------------
 drivers/gpio/gpio-timberdale.c | 35 +++++------------------------------
 drivers/gpio/gpio-zevio.c      | 21 +++------------------
 4 files changed, 19 insertions(+), 96 deletions(-)

-- 
2.8.0

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

* [PATCH 1/4] gpio: sodaville: make it explicitly non-modular
  2016-05-09 23:59 [PATCH 0/4] gpio: batch #3: remove modular code from non-modular drivers Paul Gortmaker
@ 2016-05-09 23:59 ` Paul Gortmaker
  2016-05-11 11:47   ` Linus Walleij
  2016-05-09 23:59 ` [PATCH 2/4] gpio: stmpe: " Paul Gortmaker
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 9+ messages in thread
From: Paul Gortmaker @ 2016-05-09 23:59 UTC (permalink / raw)
  To: linux-kernel
  Cc: Paul Gortmaker, Hans J . Koch, Linus Walleij, Alexandre Courbot,
	linux-gpio

The Kconfig currently controlling compilation of this code is:

drivers/gpio/Kconfig:config GPIO_SODAVILLE
drivers/gpio/Kconfig:   bool "Intel Sodaville GPIO 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.

We explicitly disallow a driver unbind, since that doesn't have a
sensible use case anyway, and it allows us to drop the ".remove"
code for non-modular drivers.

Since module_pci_driver() uses the same init level as the
builtin_pci_driver() does, there is no init ordering change
caused by this commit.

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

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: Hans J. Koch <hjk@linutronix.de>
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-sodaville.c | 28 ++++++----------------------
 1 file changed, 6 insertions(+), 22 deletions(-)

diff --git a/drivers/gpio/gpio-sodaville.c b/drivers/gpio/gpio-sodaville.c
index e3cb6772f6ec..7da9e6c4546a 100644
--- a/drivers/gpio/gpio-sodaville.c
+++ b/drivers/gpio/gpio-sodaville.c
@@ -3,6 +3,8 @@
  *
  *  Copyright (c) 2010, 2011 Intel Corporation
  *
+ *  Author: Hans J. Koch <hjk@linutronix.de>
+ *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License 2 as published
  *  by the Free Software Foundation.
@@ -15,7 +17,6 @@
 #include <linux/irq.h>
 #include <linux/interrupt.h>
 #include <linux/kernel.h>
-#include <linux/module.h>
 #include <linux/pci.h>
 #include <linux/platform_device.h>
 #include <linux/of_irq.h>
@@ -257,34 +258,17 @@ done:
 	return ret;
 }
 
-static void sdv_gpio_remove(struct pci_dev *pdev)
-{
-	struct sdv_gpio_chip_data *sd = pci_get_drvdata(pdev);
-
-	free_irq(pdev->irq, sd);
-	irq_free_descs(sd->irq_base, SDV_NUM_PUB_GPIOS);
-
-	gpiochip_remove(&sd->chip);
-	pci_release_region(pdev, GPIO_BAR);
-	iounmap(sd->gpio_pub_base);
-	pci_disable_device(pdev);
-	kfree(sd);
-}
-
 static const struct pci_device_id sdv_gpio_pci_ids[] = {
 	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_SDV_GPIO) },
 	{ 0, },
 };
 
 static struct pci_driver sdv_gpio_driver = {
+	.driver = {
+		.suppress_bind_attrs = true,
+	},
 	.name = DRV_NAME,
 	.id_table = sdv_gpio_pci_ids,
 	.probe = sdv_gpio_probe,
-	.remove = sdv_gpio_remove,
 };
-
-module_pci_driver(sdv_gpio_driver);
-
-MODULE_AUTHOR("Hans J. Koch <hjk@linutronix.de>");
-MODULE_DESCRIPTION("GPIO interface for Intel Sodaville SoCs");
-MODULE_LICENSE("GPL v2");
+builtin_pci_driver(sdv_gpio_driver);
-- 
2.8.0

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

* [PATCH 2/4] gpio: stmpe: make it explicitly non-modular
  2016-05-09 23:59 [PATCH 0/4] gpio: batch #3: remove modular code from non-modular drivers Paul Gortmaker
  2016-05-09 23:59 ` [PATCH 1/4] gpio: sodaville: make it explicitly non-modular Paul Gortmaker
@ 2016-05-09 23:59 ` Paul Gortmaker
  2016-05-11 11:48   ` Linus Walleij
  2016-05-09 23:59 ` [PATCH 3/4] gpio: timberdale: " Paul Gortmaker
  2016-05-09 23:59 ` [PATCH 4/4] gpio: zevio: " Paul Gortmaker
  3 siblings, 1 reply; 9+ messages in thread
From: Paul Gortmaker @ 2016-05-09 23:59 UTC (permalink / raw)
  To: linux-kernel
  Cc: Paul Gortmaker, Linus Walleij, Alexandre Courbot, Rabin Vincent,
	linux-gpio

The Kconfig currently controlling compilation of this code is:

drivers/gpio/Kconfig:config GPIO_STMPE
drivers/gpio/Kconfig:   bool "STMPE GPIOs"

...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.

We explicitly disallow a driver unbind, since that doesn't have a
sensible use case anyway, and it allows us to drop the ".remove"
code for non-modular drivers.

Curiously, this driver was using subsys_initcall since day one, so
we don't have the "normal" module_init replacement in this change
like we've done in other similar driver updates.

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: Rabin Vincent <rabin.vincent@stericsson.com>
Cc: linux-gpio@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 drivers/gpio/gpio-stmpe.c | 31 +++++--------------------------
 1 file changed, 5 insertions(+), 26 deletions(-)

diff --git a/drivers/gpio/gpio-stmpe.c b/drivers/gpio/gpio-stmpe.c
index 5197edf1acfd..6f7af28b8966 100644
--- a/drivers/gpio/gpio-stmpe.c
+++ b/drivers/gpio/gpio-stmpe.c
@@ -5,7 +5,6 @@
  * Author: Rabin Vincent <rabin.vincent@stericsson.com> for ST-Ericsson
  */
 
-#include <linux/module.h>
 #include <linux/init.h>
 #include <linux/platform_device.h>
 #include <linux/slab.h>
@@ -413,23 +412,13 @@ out_free:
 	return ret;
 }
 
-static int stmpe_gpio_remove(struct platform_device *pdev)
-{
-	struct stmpe_gpio *stmpe_gpio = platform_get_drvdata(pdev);
-	struct stmpe *stmpe = stmpe_gpio->stmpe;
-
-	gpiochip_remove(&stmpe_gpio->chip);
-	stmpe_disable(stmpe, STMPE_BLOCK_GPIO);
-	kfree(stmpe_gpio);
-
-	return 0;
-}
-
 static struct platform_driver stmpe_gpio_driver = {
-	.driver.name	= "stmpe-gpio",
-	.driver.owner	= THIS_MODULE,
+	.driver = {
+		.suppress_bind_attrs	= true,
+		.name			= "stmpe-gpio",
+		.owner			= THIS_MODULE,
+	},
 	.probe		= stmpe_gpio_probe,
-	.remove		= stmpe_gpio_remove,
 };
 
 static int __init stmpe_gpio_init(void)
@@ -437,13 +426,3 @@ static int __init stmpe_gpio_init(void)
 	return platform_driver_register(&stmpe_gpio_driver);
 }
 subsys_initcall(stmpe_gpio_init);
-
-static void __exit stmpe_gpio_exit(void)
-{
-	platform_driver_unregister(&stmpe_gpio_driver);
-}
-module_exit(stmpe_gpio_exit);
-
-MODULE_LICENSE("GPL v2");
-MODULE_DESCRIPTION("STMPExxxx GPIO driver");
-MODULE_AUTHOR("Rabin Vincent <rabin.vincent@stericsson.com>");
-- 
2.8.0

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

* [PATCH 3/4] gpio: timberdale: make it explicitly non-modular
  2016-05-09 23:59 [PATCH 0/4] gpio: batch #3: remove modular code from non-modular drivers Paul Gortmaker
  2016-05-09 23:59 ` [PATCH 1/4] gpio: sodaville: make it explicitly non-modular Paul Gortmaker
  2016-05-09 23:59 ` [PATCH 2/4] gpio: stmpe: " Paul Gortmaker
@ 2016-05-09 23:59 ` Paul Gortmaker
  2016-05-11 11:49   ` Linus Walleij
  2016-05-09 23:59 ` [PATCH 4/4] gpio: zevio: " Paul Gortmaker
  3 siblings, 1 reply; 9+ messages in thread
From: Paul Gortmaker @ 2016-05-09 23:59 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_TIMBERDALE
drivers/gpio/Kconfig:   bool "Support for timberdale GPIO IP"

...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.

We explicitly disallow a driver unbind, since that doesn't have a
sensible use case anyway, and it allows us to drop the ".remove"
code for non-modular drivers.

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
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: linux-gpio@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 drivers/gpio/gpio-timberdale.c | 35 +++++------------------------------
 1 file changed, 5 insertions(+), 30 deletions(-)

diff --git a/drivers/gpio/gpio-timberdale.c b/drivers/gpio/gpio-timberdale.c
index 85ed608c2b27..181f86ce00cd 100644
--- a/drivers/gpio/gpio-timberdale.c
+++ b/drivers/gpio/gpio-timberdale.c
@@ -1,5 +1,6 @@
 /*
  * Timberdale FPGA GPIO driver
+ * Author: Mocean Laboratories
  * Copyright (c) 2009 Intel Corporation
  *
  * This program is free software; you can redistribute it and/or modify
@@ -20,7 +21,7 @@
  * Timberdale FPGA GPIO
  */
 
-#include <linux/module.h>
+#include <linux/init.h>
 #include <linux/gpio.h>
 #include <linux/platform_device.h>
 #include <linux/irq.h>
@@ -290,40 +291,14 @@ static int timbgpio_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int timbgpio_remove(struct platform_device *pdev)
-{
-	struct timbgpio_platform_data *pdata = dev_get_platdata(&pdev->dev);
-	struct timbgpio *tgpio = platform_get_drvdata(pdev);
-	int irq = platform_get_irq(pdev, 0);
-
-	if (irq >= 0 && tgpio->irq_base > 0) {
-		int i;
-		for (i = 0; i < pdata->nr_pins; i++) {
-			irq_set_chip(tgpio->irq_base + i, NULL);
-			irq_set_chip_data(tgpio->irq_base + i, NULL);
-		}
-
-		irq_set_handler(irq, NULL);
-		irq_set_handler_data(irq, NULL);
-	}
-
-	return 0;
-}
-
 static struct platform_driver timbgpio_platform_driver = {
 	.driver = {
-		.name	= DRIVER_NAME,
+		.name			= DRIVER_NAME,
+		.suppress_bind_attrs	= true,
 	},
 	.probe		= timbgpio_probe,
-	.remove		= timbgpio_remove,
 };
 
 /*--------------------------------------------------------------------------*/
 
-module_platform_driver(timbgpio_platform_driver);
-
-MODULE_DESCRIPTION("Timberdale GPIO driver");
-MODULE_LICENSE("GPL v2");
-MODULE_AUTHOR("Mocean Laboratories");
-MODULE_ALIAS("platform:"DRIVER_NAME);
-
+builtin_platform_driver(timbgpio_platform_driver);
-- 
2.8.0

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

* [PATCH 4/4] gpio: zevio: make it explicitly non-modular
  2016-05-09 23:59 [PATCH 0/4] gpio: batch #3: remove modular code from non-modular drivers Paul Gortmaker
                   ` (2 preceding siblings ...)
  2016-05-09 23:59 ` [PATCH 3/4] gpio: timberdale: " Paul Gortmaker
@ 2016-05-09 23:59 ` Paul Gortmaker
  2016-05-11 11:50   ` Linus Walleij
  3 siblings, 1 reply; 9+ messages in thread
From: Paul Gortmaker @ 2016-05-09 23:59 UTC (permalink / raw)
  To: linux-kernel
  Cc: Paul Gortmaker, Linus Walleij, Alexandre Courbot, Fabian Vogt,
	linux-gpio

The Kconfig currently controlling compilation of this code is:

drivers/gpio/Kconfig:config GPIO_ZEVIO
drivers/gpio/Kconfig:   bool "LSI ZEVIO SoC memory mapped GPIOs"

...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.

We explicitly disallow a driver unbind, since that doesn't have a
sensible use case anyway, and it allows us to drop the ".remove"
code for non-modular drivers.

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: Linus Walleij <linus.walleij@linaro.org>
Cc: Alexandre Courbot <gnurou@gmail.com>
Cc: Fabian Vogt <fabian@ritter-vogt.de>
Cc: linux-gpio@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 drivers/gpio/gpio-zevio.c | 21 +++------------------
 1 file changed, 3 insertions(+), 18 deletions(-)

diff --git a/drivers/gpio/gpio-zevio.c b/drivers/gpio/gpio-zevio.c
index cda6d922be98..e23ef7b9451d 100644
--- a/drivers/gpio/gpio-zevio.c
+++ b/drivers/gpio/gpio-zevio.c
@@ -10,7 +10,7 @@
 
 #include <linux/spinlock.h>
 #include <linux/errno.h>
-#include <linux/module.h>
+#include <linux/init.h>
 #include <linux/bitops.h>
 #include <linux/io.h>
 #include <linux/of_device.h>
@@ -203,32 +203,17 @@ static int zevio_gpio_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int zevio_gpio_remove(struct platform_device *pdev)
-{
-	struct zevio_gpio *controller = platform_get_drvdata(pdev);
-
-	of_mm_gpiochip_remove(&controller->chip);
-
-	return 0;
-}
-
 static const struct of_device_id zevio_gpio_of_match[] = {
 	{ .compatible = "lsi,zevio-gpio", },
 	{ },
 };
 
-MODULE_DEVICE_TABLE(of, zevio_gpio_of_match);
-
 static struct platform_driver zevio_gpio_driver = {
 	.driver		= {
 		.name	= "gpio-zevio",
 		.of_match_table = zevio_gpio_of_match,
+		.suppress_bind_attrs = true,
 	},
 	.probe		= zevio_gpio_probe,
-	.remove		= zevio_gpio_remove,
 };
-module_platform_driver(zevio_gpio_driver);
-
-MODULE_LICENSE("GPL");
-MODULE_AUTHOR("Fabian Vogt <fabian@ritter-vogt.de>");
-MODULE_DESCRIPTION("LSI ZEVIO SoC GPIO driver");
+builtin_platform_driver(zevio_gpio_driver);
-- 
2.8.0

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

* Re: [PATCH 1/4] gpio: sodaville: make it explicitly non-modular
  2016-05-09 23:59 ` [PATCH 1/4] gpio: sodaville: make it explicitly non-modular Paul Gortmaker
@ 2016-05-11 11:47   ` Linus Walleij
  0 siblings, 0 replies; 9+ messages in thread
From: Linus Walleij @ 2016-05-11 11:47 UTC (permalink / raw)
  To: Paul Gortmaker; +Cc: linux-kernel, Hans J . Koch, Alexandre Courbot, linux-gpio

On Tue, May 10, 2016 at 1:59 AM, Paul Gortmaker
<paul.gortmaker@windriver.com> wrote:

> The Kconfig currently controlling compilation of this code is:
>
> drivers/gpio/Kconfig:config GPIO_SODAVILLE
> drivers/gpio/Kconfig:   bool "Intel Sodaville GPIO 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.
>
> We explicitly disallow a driver unbind, since that doesn't have a
> sensible use case anyway, and it allows us to drop the ".remove"
> code for non-modular drivers.
>
> Since module_pci_driver() uses the same init level as the
> builtin_pci_driver() does, there is no init ordering change
> caused by this commit.
>
> We don't replace module.h with init.h since the file already has that.
>
> 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: Hans J. Koch <hjk@linutronix.de>
> 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] 9+ messages in thread

* Re: [PATCH 2/4] gpio: stmpe: make it explicitly non-modular
  2016-05-09 23:59 ` [PATCH 2/4] gpio: stmpe: " Paul Gortmaker
@ 2016-05-11 11:48   ` Linus Walleij
  0 siblings, 0 replies; 9+ messages in thread
From: Linus Walleij @ 2016-05-11 11:48 UTC (permalink / raw)
  To: Paul Gortmaker; +Cc: linux-kernel, Alexandre Courbot, linux-gpio, Rabin Vincent

On Tue, May 10, 2016 at 1:59 AM, Paul Gortmaker
<paul.gortmaker@windriver.com> wrote:

> The Kconfig currently controlling compilation of this code is:
>
> drivers/gpio/Kconfig:config GPIO_STMPE
> drivers/gpio/Kconfig:   bool "STMPE GPIOs"
>
> ...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.
>
> We explicitly disallow a driver unbind, since that doesn't have a
> sensible use case anyway, and it allows us to drop the ".remove"
> code for non-modular drivers.
>
> Curiously, this driver was using subsys_initcall since day one, so
> we don't have the "normal" module_init replacement in this change
> like we've done in other similar driver updates.
>
> 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: Rabin Vincent <rabin.vincent@stericsson.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] 9+ messages in thread

* Re: [PATCH 3/4] gpio: timberdale: make it explicitly non-modular
  2016-05-09 23:59 ` [PATCH 3/4] gpio: timberdale: " Paul Gortmaker
@ 2016-05-11 11:49   ` Linus Walleij
  0 siblings, 0 replies; 9+ messages in thread
From: Linus Walleij @ 2016-05-11 11:49 UTC (permalink / raw)
  To: Paul Gortmaker; +Cc: linux-kernel, Alexandre Courbot, linux-gpio

On Tue, May 10, 2016 at 1:59 AM, Paul Gortmaker
<paul.gortmaker@windriver.com> wrote:

> The Kconfig currently controlling compilation of this code is:
>
> drivers/gpio/Kconfig:config GPIO_TIMBERDALE
> drivers/gpio/Kconfig:   bool "Support for timberdale GPIO IP"
>
> ...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.
>
> We explicitly disallow a driver unbind, since that doesn't have a
> sensible use case anyway, and it allows us to drop the ".remove"
> code for non-modular drivers.
>
> 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
> 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: linux-gpio@vger.kernel.org
> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>

Patch applied.

Yours,
Linus Walleij

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

* Re: [PATCH 4/4] gpio: zevio: make it explicitly non-modular
  2016-05-09 23:59 ` [PATCH 4/4] gpio: zevio: " Paul Gortmaker
@ 2016-05-11 11:50   ` Linus Walleij
  0 siblings, 0 replies; 9+ messages in thread
From: Linus Walleij @ 2016-05-11 11:50 UTC (permalink / raw)
  To: Paul Gortmaker; +Cc: linux-kernel, Alexandre Courbot, Fabian Vogt, linux-gpio

On Tue, May 10, 2016 at 1:59 AM, Paul Gortmaker
<paul.gortmaker@windriver.com> wrote:

> The Kconfig currently controlling compilation of this code is:
>
> drivers/gpio/Kconfig:config GPIO_ZEVIO
> drivers/gpio/Kconfig:   bool "LSI ZEVIO SoC memory mapped GPIOs"
>
> ...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.
>
> We explicitly disallow a driver unbind, since that doesn't have a
> sensible use case anyway, and it allows us to drop the ".remove"
> code for non-modular drivers.
>
> 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: Linus Walleij <linus.walleij@linaro.org>
> Cc: Alexandre Courbot <gnurou@gmail.com>
> Cc: Fabian Vogt <fabian@ritter-vogt.de>
> 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] 9+ messages in thread

end of thread, other threads:[~2016-05-11 11:50 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-09 23:59 [PATCH 0/4] gpio: batch #3: remove modular code from non-modular drivers Paul Gortmaker
2016-05-09 23:59 ` [PATCH 1/4] gpio: sodaville: make it explicitly non-modular Paul Gortmaker
2016-05-11 11:47   ` Linus Walleij
2016-05-09 23:59 ` [PATCH 2/4] gpio: stmpe: " Paul Gortmaker
2016-05-11 11:48   ` Linus Walleij
2016-05-09 23:59 ` [PATCH 3/4] gpio: timberdale: " Paul Gortmaker
2016-05-11 11:49   ` Linus Walleij
2016-05-09 23:59 ` [PATCH 4/4] gpio: zevio: " Paul Gortmaker
2016-05-11 11:50   ` 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).