linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] pinctrl: sunxi: make sun5i explicitly non-modular
@ 2017-02-02 20:17 Paul Gortmaker
  2017-02-06  3:27 ` Chen-Yu Tsai
  2017-02-06 10:29 ` Linus Walleij
  0 siblings, 2 replies; 3+ messages in thread
From: Paul Gortmaker @ 2017-02-02 20:17 UTC (permalink / raw)
  To: linux-kernel
  Cc: Paul Gortmaker, Linus Walleij, Maxime Ripard, Chen-Yu Tsai, linux-gpio

We had all these corrected in commit 0c8c6ba00cbf ("pinctrl: sunxi:
make bool drivers explicitly non-modular") but this new one recently
crept in.

The Kconfig currently controlling compilation of this code is:

   drivers/pinctrl/sunxi/Kconfig:config PINCTRL_SUN5I
   drivers/pinctrl/sunxi/Kconfig:  def_bool MACH_SUN5I

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

Lets remove the couple traces of modular infrastructure use, 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: Linus Walleij <linus.walleij@linaro.org>
Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: Chen-Yu Tsai <wens@csie.org>
Cc: linux-gpio@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 drivers/pinctrl/sunxi/pinctrl-sun5i.c | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/drivers/pinctrl/sunxi/pinctrl-sun5i.c b/drivers/pinctrl/sunxi/pinctrl-sun5i.c
index c8a94323ce8b..7e8204482ecf 100644
--- a/drivers/pinctrl/sunxi/pinctrl-sun5i.c
+++ b/drivers/pinctrl/sunxi/pinctrl-sun5i.c
@@ -4,12 +4,12 @@
  * Copyright (C) 2014-2016 Maxime Ripard <maxime.ripard@free-electrons.com>
  * Copyright (C) 2016 Mylene Josserand <mylene.josserand@free-electrons.com>
  *
-g * This file is licensed under the terms of the GNU General Public
+ * This file is licensed under the terms of the GNU General Public
  * License version 2.  This program is licensed "as is" without any
  * warranty of any kind, whether express or implied.
  */
 
-#include <linux/module.h>
+#include <linux/init.h>
 #include <linux/platform_device.h>
 #include <linux/of.h>
 #include <linux/of_device.h>
@@ -740,7 +740,6 @@ static const struct of_device_id sun5i_pinctrl_match[] = {
 	},
 	{ },
 };
-MODULE_DEVICE_TABLE(of, sun5i_pinctrl_match);
 
 static struct platform_driver sun5i_pinctrl_driver = {
 	.probe	= sun5i_pinctrl_probe,
@@ -749,8 +748,4 @@ static struct platform_driver sun5i_pinctrl_driver = {
 		.of_match_table	= sun5i_pinctrl_match,
 	},
 };
-module_platform_driver(sun5i_pinctrl_driver);
-
-MODULE_AUTHOR("Maxime Ripard <maxime.ripard@free-electrons.com");
-MODULE_DESCRIPTION("Allwinner sun5i pinctrl driver");
-MODULE_LICENSE("GPL");
+builtin_platform_driver(sun5i_pinctrl_driver);
-- 
2.11.0

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

* Re: [PATCH] pinctrl: sunxi: make sun5i explicitly non-modular
  2017-02-02 20:17 [PATCH] pinctrl: sunxi: make sun5i explicitly non-modular Paul Gortmaker
@ 2017-02-06  3:27 ` Chen-Yu Tsai
  2017-02-06 10:29 ` Linus Walleij
  1 sibling, 0 replies; 3+ messages in thread
From: Chen-Yu Tsai @ 2017-02-06  3:27 UTC (permalink / raw)
  To: Paul Gortmaker
  Cc: linux-kernel, Linus Walleij, Maxime Ripard, Chen-Yu Tsai, linux-gpio

On Fri, Feb 3, 2017 at 4:17 AM, Paul Gortmaker
<paul.gortmaker@windriver.com> wrote:
> We had all these corrected in commit 0c8c6ba00cbf ("pinctrl: sunxi:
> make bool drivers explicitly non-modular") but this new one recently
> crept in.
>
> The Kconfig currently controlling compilation of this code is:
>
>    drivers/pinctrl/sunxi/Kconfig:config PINCTRL_SUN5I
>    drivers/pinctrl/sunxi/Kconfig:  def_bool MACH_SUN5I
>
> ...meaning that it currently is not being built as a module by anyone.
>
> Lets remove the couple traces of modular infrastructure use, 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: Linus Walleij <linus.walleij@linaro.org>
> Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
> Cc: Chen-Yu Tsai <wens@csie.org>
> Cc: linux-gpio@vger.kernel.org
> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>

Acked-by: Chen-Yu Tsai <wens@csie.org>

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

* Re: [PATCH] pinctrl: sunxi: make sun5i explicitly non-modular
  2017-02-02 20:17 [PATCH] pinctrl: sunxi: make sun5i explicitly non-modular Paul Gortmaker
  2017-02-06  3:27 ` Chen-Yu Tsai
@ 2017-02-06 10:29 ` Linus Walleij
  1 sibling, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2017-02-06 10:29 UTC (permalink / raw)
  To: Paul Gortmaker; +Cc: linux-kernel, Maxime Ripard, Chen-Yu Tsai, linux-gpio

On Thu, Feb 2, 2017 at 9:17 PM, Paul Gortmaker
<paul.gortmaker@windriver.com> wrote:

> We had all these corrected in commit 0c8c6ba00cbf ("pinctrl: sunxi:
> make bool drivers explicitly non-modular") but this new one recently
> crept in.
>
> The Kconfig currently controlling compilation of this code is:
>
>    drivers/pinctrl/sunxi/Kconfig:config PINCTRL_SUN5I
>    drivers/pinctrl/sunxi/Kconfig:  def_bool MACH_SUN5I
>
> ...meaning that it currently is not being built as a module by anyone.
>
> Lets remove the couple traces of modular infrastructure use, 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: Linus Walleij <linus.walleij@linaro.org>
> Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
> Cc: Chen-Yu Tsai <wens@csie.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] 3+ messages in thread

end of thread, other threads:[~2017-02-06 10:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-02 20:17 [PATCH] pinctrl: sunxi: make sun5i explicitly non-modular Paul Gortmaker
2017-02-06  3:27 ` Chen-Yu Tsai
2017-02-06 10:29 ` 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).