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


Groups > linux.kernel > #1431300 > unrolled thread

[PATCH 00/19] pinctrl/freescale: fix module usage in non-modular code

Started byPaul Gortmaker <paul.gortmaker@windriver.com>
First post2016-06-26 04:50 +0200
Last post2016-06-26 05:00 +0200
Articles 11 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH 00/19] pinctrl/freescale: fix module usage in non-modular code Paul Gortmaker <paul.gortmaker@windriver.com> - 2016-06-26 04:50 +0200
    [PATCH 15/19] pinctrl: imx7d: make it explicitly non-modular Paul Gortmaker <paul.gortmaker@windriver.com> - 2016-06-26 04:50 +0200
    [PATCH 11/19] pinctrl: imx6q: make it explicitly non-modular Paul Gortmaker <paul.gortmaker@windriver.com> - 2016-06-26 04:50 +0200
    [PATCH 18/19] pinctrl: imx28: make it explicitly non-modular Paul Gortmaker <paul.gortmaker@windriver.com> - 2016-06-26 05:00 +0200
    [PATCH 14/19] pinctrl: imx6ul: make it explicitly non-modular Paul Gortmaker <paul.gortmaker@windriver.com> - 2016-06-26 05:00 +0200
    [PATCH 04/19] pinctrl: imx25: make it explicitly non-modular Paul Gortmaker <paul.gortmaker@windriver.com> - 2016-06-26 05:00 +0200
    [PATCH 06/19] pinctrl: imx35: make it explicitly non-modular Paul Gortmaker <paul.gortmaker@windriver.com> - 2016-06-26 05:00 +0200
    [PATCH 16/19] pinctrl: vf610: make it explicitly non-modular Paul Gortmaker <paul.gortmaker@windriver.com> - 2016-06-26 05:00 +0200
    [PATCH 07/19] pinctrl: imx50: make it explicitly non-modular Paul Gortmaker <paul.gortmaker@windriver.com> - 2016-06-26 05:00 +0200
    [PATCH 05/19] pinctrl: imx27: make it explicitly non-modular Paul Gortmaker <paul.gortmaker@windriver.com> - 2016-06-26 05:00 +0200
    [PATCH 03/19] pinctrl: imx21: make it explicitly non-modular Paul Gortmaker <paul.gortmaker@windriver.com> - 2016-06-26 05:00 +0200

#1431300 — [PATCH 00/19] pinctrl/freescale: fix module usage in non-modular code

FromPaul Gortmaker <paul.gortmaker@windriver.com>
Date2016-06-26 04:50 +0200
Subject[PATCH 00/19] pinctrl/freescale: fix module usage in non-modular code
Message-ID<rO8iZ-5rJ-3@gated-at.bofh.it>
This series covers the audit of non-modular module code use in the
drivers/pinctrl/freescale directory.  It has a few more commits than
I'd normally like in a single series, but fortunately the most of them
are dead simple.  That said, I can put the branch on kernel.org if
that makes life easier for merge processing, given the quantity.

FWIW, I originally had [locally] treated this whole Fsl directory as a
single patch, but upon reflection that didn't seem right either, given
the various authors, and the size of the combined changeset virtually
ensured that nobody Cc'd would genuinely review it all.  So 19 it is.

The changes in the drivers for #2-#16 inclusive are just removing the
module.h include, the unused exit function, and the no-op AUTHOR/LICENSE
tags with the occasional no-op MODULE_DEVICE_TABLE remove sprinkled in.

Only the imx23 and imx28 drivers still linked in a ".remove" function
(a shared one) and that usage is phased out in the patch #17 and #18,
where we also block sysfs unbind.  We get rid of the shared fcn in #19.

Quasi generic boiler plate description follows; included for folks who
haven't yet seen what we are aiming to achieve with this operation.

We are trying to not use module support for code that can never be built
as a module because:

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

The freescale directory is a good example of #4, since all the
drivers seem to share a common heritage from one driver that had the
fundamental Kconfig vs. code mismatch originally (probably imx1).

Changes seen here cover the following categories:

  -just replacement of modular macros with their non-modular
   equivalents that CPP would have inserted anyway

  -the removal of including module.h ; replaced with init.h
   and/or export.h as required based on whether the file used it.

  -the removal of any/all unused/orphaned __exit functions that
   would never be called.

  -the removal of any ".remove" functions that were hooked into
   the driver struct.   This ".remove" function would of
   course not be called from the __exit function since that was
   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 the driver.  [only imx23 and imx28]

There are no initcall level changes here; everything stays at the level
of initcall it was previously - either by not using modular versions to
begin with, or by using the builtin level equivalents.

As usual, we can consider making some of these tristate if the author
has strong feelings about extending support into the modular realm,
but I won't be able to run-time test any of that.

Build testing done on linux-next (on arm) as usual.

Paul.
---

Cc: Alexander Shiyan <shc_work@mail.ru>
Cc: Anson Huang <Anson.Huang@freescale.com>
Cc: Denis Carikli <denis@eukrea.com>
Cc: Dong Aisheng <dong.aisheng@linaro.org>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Markus Pargmann <mpa@pengutronix.de>
Cc: Shawn Guo <shawn.guo@linaro.org>
Cc: linux-gpio@vger.kernel.org

Paul Gortmaker (19):
  pinctrl: freescale: remove needless module.h include
  pinctrl: imx1: make it explicitly non-modular
  pinctrl: imx21: make it explicitly non-modular
  pinctrl: imx25: make it explicitly non-modular
  pinctrl: imx27: make it explicitly non-modular
  pinctrl: imx35: make it explicitly non-modular
  pinctrl: imx50: make it explicitly non-modular
  pinctrl: imx51: make it explicitly non-modular
  pinctrl: imx53: make it explicitly non-modular
  pinctrl: imx6dl: make it explicitly non-modular
  pinctrl: imx6q: make it explicitly non-modular
  pinctrl: imx6sl: make it explicitly non-modular
  pinctrl: imx6sx: make it explicitly non-modular
  pinctrl: imx6ul: make it explicitly non-modular
  pinctrl: imx7d: make it explicitly non-modular
  pinctrl: vf610: make it explicitly non-modular
  pinctrl: imx23: make it explicitly non-modular
  pinctrl: imx28: make it explicitly non-modular
  pinctrl: remove orphaned exported ".remove" function

 drivers/pinctrl/freescale/pinctrl-imx.c       |  1 -
 drivers/pinctrl/freescale/pinctrl-imx1-core.c |  1 -
 drivers/pinctrl/freescale/pinctrl-imx1.c      |  9 ++-------
 drivers/pinctrl/freescale/pinctrl-imx21.c     |  8 ++------
 drivers/pinctrl/freescale/pinctrl-imx23.c     | 17 ++++-------------
 drivers/pinctrl/freescale/pinctrl-imx25.c     | 10 ----------
 drivers/pinctrl/freescale/pinctrl-imx27.c     | 10 ----------
 drivers/pinctrl/freescale/pinctrl-imx28.c     | 17 ++++-------------
 drivers/pinctrl/freescale/pinctrl-imx35.c     | 10 ----------
 drivers/pinctrl/freescale/pinctrl-imx50.c     |  9 ---------
 drivers/pinctrl/freescale/pinctrl-imx51.c     | 10 ----------
 drivers/pinctrl/freescale/pinctrl-imx53.c     | 10 ----------
 drivers/pinctrl/freescale/pinctrl-imx6dl.c    | 14 +++-----------
 drivers/pinctrl/freescale/pinctrl-imx6q.c     | 10 ----------
 drivers/pinctrl/freescale/pinctrl-imx6sl.c    | 15 +++------------
 drivers/pinctrl/freescale/pinctrl-imx6sx.c    | 14 +++-----------
 drivers/pinctrl/freescale/pinctrl-imx6ul.c    | 14 +++-----------
 drivers/pinctrl/freescale/pinctrl-imx7d.c     | 14 +++-----------
 drivers/pinctrl/freescale/pinctrl-mxs.c       | 12 ------------
 drivers/pinctrl/freescale/pinctrl-mxs.h       |  1 -
 drivers/pinctrl/freescale/pinctrl-vf610.c     | 10 ----------
 21 files changed, 27 insertions(+), 189 deletions(-)

-- 
2.8.4

[toc] | [next] | [standalone]


#1431301 — [PATCH 15/19] pinctrl: imx7d: make it explicitly non-modular

FromPaul Gortmaker <paul.gortmaker@windriver.com>
Date2016-06-26 04:50 +0200
Subject[PATCH 15/19] pinctrl: imx7d: make it explicitly non-modular
Message-ID<rO8j0-5rJ-39@gated-at.bofh.it>
In reply to#1431300
The Kconfig currently controlling compilation of this code is:

drivers/pinctrl/freescale/Kconfig:config PINCTRL_IMX7D
drivers/pinctrl/freescale/Kconfig:	bool "IMX7D pinctrl driver"

...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_init was not in use by this 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: Anson Huang <Anson.Huang@freescale.com>
Cc: linux-gpio@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 drivers/pinctrl/freescale/pinctrl-imx7d.c | 14 +++-----------
 1 file changed, 3 insertions(+), 11 deletions(-)

diff --git a/drivers/pinctrl/freescale/pinctrl-imx7d.c b/drivers/pinctrl/freescale/pinctrl-imx7d.c
index d30d91f80dfd..a465a66c3ef4 100644
--- a/drivers/pinctrl/freescale/pinctrl-imx7d.c
+++ b/drivers/pinctrl/freescale/pinctrl-imx7d.c
@@ -1,4 +1,7 @@
 /*
+ * Freescale imx7d pinctrl driver
+ *
+ * Author: Anson Huang <Anson.Huang@freescale.com>
  * Copyright (C) 2014-2015 Freescale Semiconductor, Inc.
  *
  * This program is free software; you can redistribute it and/or modify
@@ -9,7 +12,6 @@
 #include <linux/err.h>
 #include <linux/init.h>
 #include <linux/io.h>
-#include <linux/module.h>
 #include <linux/of.h>
 #include <linux/of_device.h>
 #include <linux/pinctrl/pinctrl.h>
@@ -402,13 +404,3 @@ static int __init imx7d_pinctrl_init(void)
 	return platform_driver_register(&imx7d_pinctrl_driver);
 }
 arch_initcall(imx7d_pinctrl_init);
-
-static void __exit imx7d_pinctrl_exit(void)
-{
-	platform_driver_unregister(&imx7d_pinctrl_driver);
-}
-module_exit(imx7d_pinctrl_exit);
-
-MODULE_AUTHOR("Anson Huang <Anson.Huang@freescale.com>");
-MODULE_DESCRIPTION("Freescale imx7d pinctrl driver");
-MODULE_LICENSE("GPL v2");
-- 
2.8.4

[toc] | [prev] | [next] | [standalone]


#1431304 — [PATCH 11/19] pinctrl: imx6q: make it explicitly non-modular

FromPaul Gortmaker <paul.gortmaker@windriver.com>
Date2016-06-26 04:50 +0200
Subject[PATCH 11/19] pinctrl: imx6q: make it explicitly non-modular
Message-ID<rO8j0-5rJ-41@gated-at.bofh.it>
In reply to#1431300
The Kconfig currently controlling compilation of this code is:

drivers/pinctrl/freescale/Kconfig:config PINCTRL_IMX6Q
drivers/pinctrl/freescale/Kconfig:	bool "IMX6Q/DL pinctrl driver"

...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_init translates to device_initcall in the non-modular
case, the init ordering remains unchanged with this commit.

We don't replace module.h with init.h since the file already has that.
But we do add export.h since this file uses the global THIS_MODULE.

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: Dong Aisheng <dong.aisheng@linaro.org>
Cc: linux-gpio@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 drivers/pinctrl/freescale/pinctrl-imx6q.c | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/drivers/pinctrl/freescale/pinctrl-imx6q.c b/drivers/pinctrl/freescale/pinctrl-imx6q.c
index 55cd8a0e367d..d61651c40458 100644
--- a/drivers/pinctrl/freescale/pinctrl-imx6q.c
+++ b/drivers/pinctrl/freescale/pinctrl-imx6q.c
@@ -15,7 +15,6 @@
 #include <linux/err.h>
 #include <linux/init.h>
 #include <linux/io.h>
-#include <linux/module.h>
 #include <linux/of.h>
 #include <linux/of_device.h>
 #include <linux/pinctrl/pinctrl.h>
@@ -490,12 +489,3 @@ static int __init imx6q_pinctrl_init(void)
 	return platform_driver_register(&imx6q_pinctrl_driver);
 }
 arch_initcall(imx6q_pinctrl_init);
-
-static void __exit imx6q_pinctrl_exit(void)
-{
-	platform_driver_unregister(&imx6q_pinctrl_driver);
-}
-module_exit(imx6q_pinctrl_exit);
-MODULE_AUTHOR("Dong Aisheng <dong.aisheng@linaro.org>");
-MODULE_DESCRIPTION("Freescale IMX6Q pinctrl driver");
-MODULE_LICENSE("GPL v2");
-- 
2.8.4

[toc] | [prev] | [next] | [standalone]


#1431305 — [PATCH 18/19] pinctrl: imx28: make it explicitly non-modular

FromPaul Gortmaker <paul.gortmaker@windriver.com>
Date2016-06-26 05:00 +0200
Subject[PATCH 18/19] pinctrl: imx28: make it explicitly non-modular
Message-ID<rO8sF-5uP-1@gated-at.bofh.it>
In reply to#1431300
The Kconfig currently controlling compilation of this code is:

drivers/pinctrl/freescale/Kconfig:config PINCTRL_IMX28
drivers/pinctrl/freescale/Kconfig:	bool

...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_init was not in use by this 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: Shawn Guo <shawn.guo@linaro.org>
Cc: linux-gpio@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 drivers/pinctrl/freescale/pinctrl-imx28.c | 17 ++++-------------
 1 file changed, 4 insertions(+), 13 deletions(-)

diff --git a/drivers/pinctrl/freescale/pinctrl-imx28.c b/drivers/pinctrl/freescale/pinctrl-imx28.c
index 5082efec4f72..295236dfb0bc 100644
--- a/drivers/pinctrl/freescale/pinctrl-imx28.c
+++ b/drivers/pinctrl/freescale/pinctrl-imx28.c
@@ -1,4 +1,7 @@
 /*
+ * Freescale i.MX28 pinctrl driver
+ *
+ * Author: Shawn Guo <shawn.guo@linaro.org>
  * Copyright 2012 Freescale Semiconductor, Inc.
  *
  * The code contained herein is licensed under the GNU General Public
@@ -10,7 +13,6 @@
  */
 
 #include <linux/init.h>
-#include <linux/module.h>
 #include <linux/of_device.h>
 #include <linux/pinctrl/pinctrl.h>
 #include "pinctrl-mxs.h"
@@ -392,15 +394,14 @@ static const struct of_device_id imx28_pinctrl_of_match[] = {
 	{ .compatible = "fsl,imx28-pinctrl", },
 	{ /* sentinel */ }
 };
-MODULE_DEVICE_TABLE(of, imx28_pinctrl_of_match);
 
 static struct platform_driver imx28_pinctrl_driver = {
 	.driver = {
 		.name = "imx28-pinctrl",
+		.suppress_bind_attrs = true,
 		.of_match_table = imx28_pinctrl_of_match,
 	},
 	.probe = imx28_pinctrl_probe,
-	.remove = mxs_pinctrl_remove,
 };
 
 static int __init imx28_pinctrl_init(void)
@@ -408,13 +409,3 @@ static int __init imx28_pinctrl_init(void)
 	return platform_driver_register(&imx28_pinctrl_driver);
 }
 postcore_initcall(imx28_pinctrl_init);
-
-static void __exit imx28_pinctrl_exit(void)
-{
-	platform_driver_unregister(&imx28_pinctrl_driver);
-}
-module_exit(imx28_pinctrl_exit);
-
-MODULE_AUTHOR("Shawn Guo <shawn.guo@linaro.org>");
-MODULE_DESCRIPTION("Freescale i.MX28 pinctrl driver");
-MODULE_LICENSE("GPL v2");
-- 
2.8.4

[toc] | [prev] | [next] | [standalone]


#1431306 — [PATCH 14/19] pinctrl: imx6ul: make it explicitly non-modular

FromPaul Gortmaker <paul.gortmaker@windriver.com>
Date2016-06-26 05:00 +0200
Subject[PATCH 14/19] pinctrl: imx6ul: make it explicitly non-modular
Message-ID<rO8sF-5uP-3@gated-at.bofh.it>
In reply to#1431300
The Kconfig currently controlling compilation of this code is:

drivers/pinctrl/freescale/Kconfig:config PINCTRL_IMX6UL
drivers/pinctrl/freescale/Kconfig:	bool "IMX6UL pinctrl driver"

...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_init was not in use by this 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: Anson Huang <Anson.Huang@freescale.com>
Cc: linux-gpio@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 drivers/pinctrl/freescale/pinctrl-imx6ul.c | 14 +++-----------
 1 file changed, 3 insertions(+), 11 deletions(-)

diff --git a/drivers/pinctrl/freescale/pinctrl-imx6ul.c b/drivers/pinctrl/freescale/pinctrl-imx6ul.c
index c707fdd933ec..1aeb840aae1d 100644
--- a/drivers/pinctrl/freescale/pinctrl-imx6ul.c
+++ b/drivers/pinctrl/freescale/pinctrl-imx6ul.c
@@ -1,4 +1,7 @@
 /*
+ * Freescale imx6ul pinctrl driver
+ *
+ * Author: Anson Huang <Anson.Huang@freescale.com>
  * Copyright (C) 2015 Freescale Semiconductor, Inc.
  *
  * This program is free software; you can redistribute it and/or modify
@@ -9,7 +12,6 @@
 #include <linux/err.h>
 #include <linux/init.h>
 #include <linux/io.h>
-#include <linux/module.h>
 #include <linux/of.h>
 #include <linux/of_device.h>
 #include <linux/pinctrl/pinctrl.h>
@@ -310,13 +312,3 @@ static int __init imx6ul_pinctrl_init(void)
 	return platform_driver_register(&imx6ul_pinctrl_driver);
 }
 arch_initcall(imx6ul_pinctrl_init);
-
-static void __exit imx6ul_pinctrl_exit(void)
-{
-	platform_driver_unregister(&imx6ul_pinctrl_driver);
-}
-module_exit(imx6ul_pinctrl_exit);
-
-MODULE_AUTHOR("Anson Huang <Anson.Huang@freescale.com>");
-MODULE_DESCRIPTION("Freescale imx6ul pinctrl driver");
-MODULE_LICENSE("GPL v2");
-- 
2.8.4

[toc] | [prev] | [next] | [standalone]


#1431307 — [PATCH 04/19] pinctrl: imx25: make it explicitly non-modular

FromPaul Gortmaker <paul.gortmaker@windriver.com>
Date2016-06-26 05:00 +0200
Subject[PATCH 04/19] pinctrl: imx25: make it explicitly non-modular
Message-ID<rO8sF-5uP-5@gated-at.bofh.it>
In reply to#1431300
The Kconfig currently controlling compilation of this code is:

drivers/pinctrl/freescale/Kconfig:config PINCTRL_IMX25
drivers/pinctrl/freescale/Kconfig:        bool "IMX25 pinctrl driver"

...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_init was not in use by this 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: Denis Carikli <denis@eukrea.com>
Cc: linux-gpio@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 drivers/pinctrl/freescale/pinctrl-imx25.c | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/drivers/pinctrl/freescale/pinctrl-imx25.c b/drivers/pinctrl/freescale/pinctrl-imx25.c
index 81ad546d74bb..d7367fabe712 100644
--- a/drivers/pinctrl/freescale/pinctrl-imx25.c
+++ b/drivers/pinctrl/freescale/pinctrl-imx25.c
@@ -18,7 +18,6 @@
 #include <linux/err.h>
 #include <linux/init.h>
 #include <linux/io.h>
-#include <linux/module.h>
 #include <linux/of.h>
 #include <linux/of_device.h>
 #include <linux/pinctrl/pinctrl.h>
@@ -338,12 +337,3 @@ static int __init imx25_pinctrl_init(void)
 	return platform_driver_register(&imx25_pinctrl_driver);
 }
 arch_initcall(imx25_pinctrl_init);
-
-static void __exit imx25_pinctrl_exit(void)
-{
-	platform_driver_unregister(&imx25_pinctrl_driver);
-}
-module_exit(imx25_pinctrl_exit);
-MODULE_AUTHOR("Denis Carikli <denis@eukrea.com>");
-MODULE_DESCRIPTION("Freescale IMX25 pinctrl driver");
-MODULE_LICENSE("GPL v2");
-- 
2.8.4

[toc] | [prev] | [next] | [standalone]


#1431308 — [PATCH 06/19] pinctrl: imx35: make it explicitly non-modular

FromPaul Gortmaker <paul.gortmaker@windriver.com>
Date2016-06-26 05:00 +0200
Subject[PATCH 06/19] pinctrl: imx35: make it explicitly non-modular
Message-ID<rO8sF-5uP-7@gated-at.bofh.it>
In reply to#1431300
The Kconfig currently controlling compilation of this code is:

drivers/pinctrl/freescale/Kconfig:config PINCTRL_IMX35
drivers/pinctrl/freescale/Kconfig:	bool "IMX35 pinctrl driver"

...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_init was not in use by this 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: Dong Aisheng <dong.aisheng@linaro.org>
Cc: linux-gpio@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 drivers/pinctrl/freescale/pinctrl-imx35.c | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/drivers/pinctrl/freescale/pinctrl-imx35.c b/drivers/pinctrl/freescale/pinctrl-imx35.c
index 13eb224a29a9..6315ba6af431 100644
--- a/drivers/pinctrl/freescale/pinctrl-imx35.c
+++ b/drivers/pinctrl/freescale/pinctrl-imx35.c
@@ -16,7 +16,6 @@
 #include <linux/err.h>
 #include <linux/init.h>
 #include <linux/io.h>
-#include <linux/module.h>
 #include <linux/of.h>
 #include <linux/of_device.h>
 #include <linux/pinctrl/pinctrl.h>
@@ -1028,12 +1027,3 @@ static int __init imx35_pinctrl_init(void)
 	return platform_driver_register(&imx35_pinctrl_driver);
 }
 arch_initcall(imx35_pinctrl_init);
-
-static void __exit imx35_pinctrl_exit(void)
-{
-	platform_driver_unregister(&imx35_pinctrl_driver);
-}
-module_exit(imx35_pinctrl_exit);
-MODULE_AUTHOR("Dong Aisheng <dong.aisheng@linaro.org>");
-MODULE_DESCRIPTION("Freescale IMX35 pinctrl driver");
-MODULE_LICENSE("GPL v2");
-- 
2.8.4

[toc] | [prev] | [next] | [standalone]


#1431309 — [PATCH 16/19] pinctrl: vf610: make it explicitly non-modular

FromPaul Gortmaker <paul.gortmaker@windriver.com>
Date2016-06-26 05:00 +0200
Subject[PATCH 16/19] pinctrl: vf610: make it explicitly non-modular
Message-ID<rO8sG-5uP-9@gated-at.bofh.it>
In reply to#1431300
The Kconfig currently controlling compilation of this code is:

drivers/pinctrl/freescale/Kconfig:config PINCTRL_VF610
drivers/pinctrl/freescale/Kconfig:	bool "Freescale Vybrid VF610 pinctrl driver"

...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_init wasn't in use by this 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: linux-gpio@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 drivers/pinctrl/freescale/pinctrl-vf610.c | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/drivers/pinctrl/freescale/pinctrl-vf610.c b/drivers/pinctrl/freescale/pinctrl-vf610.c
index 6d81be096bc0..2b1e198e3092 100644
--- a/drivers/pinctrl/freescale/pinctrl-vf610.c
+++ b/drivers/pinctrl/freescale/pinctrl-vf610.c
@@ -12,7 +12,6 @@
 #include <linux/err.h>
 #include <linux/init.h>
 #include <linux/io.h>
-#include <linux/module.h>
 #include <linux/of.h>
 #include <linux/of_device.h>
 #include <linux/pinctrl/pinctrl.h>
@@ -325,12 +324,3 @@ static int __init vf610_pinctrl_init(void)
 	return platform_driver_register(&vf610_pinctrl_driver);
 }
 arch_initcall(vf610_pinctrl_init);
-
-static void __exit vf610_pinctrl_exit(void)
-{
-	platform_driver_unregister(&vf610_pinctrl_driver);
-}
-module_exit(vf610_pinctrl_exit);
-
-MODULE_DESCRIPTION("Freescale VF610 pinctrl driver");
-MODULE_LICENSE("GPL v2");
-- 
2.8.4

[toc] | [prev] | [next] | [standalone]


#1431310 — [PATCH 07/19] pinctrl: imx50: make it explicitly non-modular

FromPaul Gortmaker <paul.gortmaker@windriver.com>
Date2016-06-26 05:00 +0200
Subject[PATCH 07/19] pinctrl: imx50: make it explicitly non-modular
Message-ID<rO8sG-5uP-11@gated-at.bofh.it>
In reply to#1431300
The Kconfig currently controlling compilation of this code is:

drivers/pinctrl/freescale/Kconfig:config PINCTRL_IMX50
drivers/pinctrl/freescale/Kconfig:	bool "IMX50 pinctrl driver"

...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_init was not in use by this 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: linux-gpio@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 drivers/pinctrl/freescale/pinctrl-imx50.c | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/drivers/pinctrl/freescale/pinctrl-imx50.c b/drivers/pinctrl/freescale/pinctrl-imx50.c
index 95a36c88b66a..8e3a17df5c5d 100644
--- a/drivers/pinctrl/freescale/pinctrl-imx50.c
+++ b/drivers/pinctrl/freescale/pinctrl-imx50.c
@@ -14,7 +14,6 @@
 #include <linux/err.h>
 #include <linux/init.h>
 #include <linux/io.h>
-#include <linux/module.h>
 #include <linux/of.h>
 #include <linux/of_device.h>
 #include <linux/pinctrl/pinctrl.h>
@@ -415,11 +414,3 @@ static int __init imx50_pinctrl_init(void)
 	return platform_driver_register(&imx50_pinctrl_driver);
 }
 arch_initcall(imx50_pinctrl_init);
-
-static void __exit imx50_pinctrl_exit(void)
-{
-	platform_driver_unregister(&imx50_pinctrl_driver);
-}
-module_exit(imx50_pinctrl_exit);
-MODULE_DESCRIPTION("Freescale IMX50 pinctrl driver");
-MODULE_LICENSE("GPL v2");
-- 
2.8.4

[toc] | [prev] | [next] | [standalone]


#1431311 — [PATCH 05/19] pinctrl: imx27: make it explicitly non-modular

FromPaul Gortmaker <paul.gortmaker@windriver.com>
Date2016-06-26 05:00 +0200
Subject[PATCH 05/19] pinctrl: imx27: make it explicitly non-modular
Message-ID<rO8sG-5uP-15@gated-at.bofh.it>
In reply to#1431300
The Kconfig currently controlling compilation of this code is:

drivers/pinctrl/freescale/Kconfig:config PINCTRL_IMX27
drivers/pinctrl/freescale/Kconfig:	bool "IMX27 pinctrl driver"

...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_init was not in use by this 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: Markus Pargmann <mpa@pengutronix.de>
Cc: linux-gpio@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 drivers/pinctrl/freescale/pinctrl-imx27.c | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/drivers/pinctrl/freescale/pinctrl-imx27.c b/drivers/pinctrl/freescale/pinctrl-imx27.c
index f828fbbba4b9..e5992036fc6c 100644
--- a/drivers/pinctrl/freescale/pinctrl-imx27.c
+++ b/drivers/pinctrl/freescale/pinctrl-imx27.c
@@ -14,7 +14,6 @@
 #include <linux/err.h>
 #include <linux/init.h>
 #include <linux/io.h>
-#include <linux/module.h>
 #include <linux/of.h>
 #include <linux/of_device.h>
 #include <linux/pinctrl/pinctrl.h>
@@ -412,12 +411,3 @@ static int __init imx27_pinctrl_init(void)
 	return platform_driver_register(&imx27_pinctrl_driver);
 }
 arch_initcall(imx27_pinctrl_init);
-
-static void __exit imx27_pinctrl_exit(void)
-{
-	platform_driver_unregister(&imx27_pinctrl_driver);
-}
-module_exit(imx27_pinctrl_exit);
-MODULE_AUTHOR("Markus Pargmann <mpa@pengutronix.de>");
-MODULE_DESCRIPTION("Freescale IMX27 pinctrl driver");
-MODULE_LICENSE("GPL v2");
-- 
2.8.4

[toc] | [prev] | [next] | [standalone]


#1431312 — [PATCH 03/19] pinctrl: imx21: make it explicitly non-modular

FromPaul Gortmaker <paul.gortmaker@windriver.com>
Date2016-06-26 05:00 +0200
Subject[PATCH 03/19] pinctrl: imx21: make it explicitly non-modular
Message-ID<rO8sG-5uP-13@gated-at.bofh.it>
In reply to#1431300
The Kconfig currently controlling compilation of this code is:

drivers/pinctrl/freescale/Kconfig:config PINCTRL_IMX21
drivers/pinctrl/freescale/Kconfig:	bool "i.MX21 pinctrl driver"

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

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: Alexander Shiyan <shc_work@mail.ru>
Cc: linux-gpio@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 drivers/pinctrl/freescale/pinctrl-imx21.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/pinctrl/freescale/pinctrl-imx21.c b/drivers/pinctrl/freescale/pinctrl-imx21.c
index aa1221f4dbb7..b9f9b3b8eeb1 100644
--- a/drivers/pinctrl/freescale/pinctrl-imx21.c
+++ b/drivers/pinctrl/freescale/pinctrl-imx21.c
@@ -9,7 +9,7 @@
  * (at your option) any later version.
  */
 
-#include <linux/module.h>
+#include <linux/init.h>
 #include <linux/of.h>
 #include <linux/platform_device.h>
 #include <linux/pinctrl/pinctrl.h>
@@ -333,8 +333,4 @@ static struct platform_driver imx21_pinctrl_driver = {
 		.of_match_table	= imx21_pinctrl_of_match,
 	},
 };
-module_platform_driver_probe(imx21_pinctrl_driver, imx21_pinctrl_probe);
-
-MODULE_AUTHOR("Alexander Shiyan <shc_work@mail.ru>");
-MODULE_DESCRIPTION("Freescale i.MX21 pinctrl driver");
-MODULE_LICENSE("GPL");
+builtin_platform_driver_probe(imx21_pinctrl_driver, imx21_pinctrl_probe);
-- 
2.8.4

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web