All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Gortmaker <paul.gortmaker-CWA4WttNNZF54TAoqtyWWQ@public.gmane.org>
To: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Hongzhou Yang
	<hongzhou.yang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>,
	Linus Walleij
	<linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	Paul Gortmaker
	<paul.gortmaker-CWA4WttNNZF54TAoqtyWWQ@public.gmane.org>,
	linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	Matthias Brugger
	<matthias.bgg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: [PATCH 2/8] drivers/pinctrl: make mediatek/pinctrl-mt6397 driver explicitly non-modular
Date: Mon, 29 Feb 2016 15:48:38 -0500	[thread overview]
Message-ID: <1456778924-20730-3-git-send-email-paul.gortmaker@windriver.com> (raw)
In-Reply-To: <1456778924-20730-1-git-send-email-paul.gortmaker-CWA4WttNNZF54TAoqtyWWQ@public.gmane.org>

The Kconfig for this driver is currently:

config PINCTRL_MT6397
        bool "Mediatek MT6397 pin control" if COMPILE_TEST && !MFD_MT6397

...meaning that it is currently 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 also delete the MODULE_LICENSE tag etc. since all that information
is already contained at the top of the file in the comments.

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

Cc: Linus Walleij <linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: Matthias Brugger <matthias.bgg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Hongzhou Yang <hongzhou.yang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
Cc: linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Signed-off-by: Paul Gortmaker <paul.gortmaker-CWA4WttNNZF54TAoqtyWWQ@public.gmane.org>
---
 drivers/pinctrl/mediatek/pinctrl-mt6397.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/drivers/pinctrl/mediatek/pinctrl-mt6397.c b/drivers/pinctrl/mediatek/pinctrl-mt6397.c
index f9751ae28e32..6eccb85c02cd 100644
--- a/drivers/pinctrl/mediatek/pinctrl-mt6397.c
+++ b/drivers/pinctrl/mediatek/pinctrl-mt6397.c
@@ -12,7 +12,7 @@
  * GNU General Public License for more details.
  */
 
-#include <linux/module.h>
+#include <linux/init.h>
 #include <linux/platform_device.h>
 #include <linux/of.h>
 #include <linux/of_device.h>
@@ -55,7 +55,6 @@ static const struct of_device_id mt6397_pctrl_match[] = {
 	{ .compatible = "mediatek,mt6397-pinctrl", },
 	{ }
 };
-MODULE_DEVICE_TABLE(of, mt6397_pctrl_match);
 
 static struct platform_driver mtk_pinctrl_driver = {
 	.probe = mt6397_pinctrl_probe,
@@ -69,9 +68,4 @@ static int __init mtk_pinctrl_init(void)
 {
 	return platform_driver_register(&mtk_pinctrl_driver);
 }
-
-module_init(mtk_pinctrl_init);
-
-MODULE_LICENSE("GPL v2");
-MODULE_DESCRIPTION("MediaTek MT6397 Pinctrl Driver");
-MODULE_AUTHOR("Hongzhou Yang <hongzhou.yang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>");
+device_initcall(mtk_pinctrl_init);
-- 
2.6.1

WARNING: multiple messages have this Message-ID (diff)
From: Paul Gortmaker <paul.gortmaker@windriver.com>
To: <linux-kernel@vger.kernel.org>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Hongzhou Yang <hongzhou.yang@mediatek.com>,
	<linux-gpio@vger.kernel.org>,
	<linux-mediatek@lists.infradead.org>
Subject: [PATCH 2/8] drivers/pinctrl: make mediatek/pinctrl-mt6397 driver explicitly non-modular
Date: Mon, 29 Feb 2016 15:48:38 -0500	[thread overview]
Message-ID: <1456778924-20730-3-git-send-email-paul.gortmaker@windriver.com> (raw)
In-Reply-To: <1456778924-20730-1-git-send-email-paul.gortmaker@windriver.com>

The Kconfig for this driver is currently:

config PINCTRL_MT6397
        bool "Mediatek MT6397 pin control" if COMPILE_TEST && !MFD_MT6397

...meaning that it is currently 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 also delete the MODULE_LICENSE tag etc. since all that information
is already contained at the top of the file in the comments.

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

Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: Hongzhou Yang <hongzhou.yang@mediatek.com>
Cc: linux-gpio@vger.kernel.org
Cc: linux-mediatek@lists.infradead.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 drivers/pinctrl/mediatek/pinctrl-mt6397.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/drivers/pinctrl/mediatek/pinctrl-mt6397.c b/drivers/pinctrl/mediatek/pinctrl-mt6397.c
index f9751ae28e32..6eccb85c02cd 100644
--- a/drivers/pinctrl/mediatek/pinctrl-mt6397.c
+++ b/drivers/pinctrl/mediatek/pinctrl-mt6397.c
@@ -12,7 +12,7 @@
  * GNU General Public License for more details.
  */
 
-#include <linux/module.h>
+#include <linux/init.h>
 #include <linux/platform_device.h>
 #include <linux/of.h>
 #include <linux/of_device.h>
@@ -55,7 +55,6 @@ static const struct of_device_id mt6397_pctrl_match[] = {
 	{ .compatible = "mediatek,mt6397-pinctrl", },
 	{ }
 };
-MODULE_DEVICE_TABLE(of, mt6397_pctrl_match);
 
 static struct platform_driver mtk_pinctrl_driver = {
 	.probe = mt6397_pinctrl_probe,
@@ -69,9 +68,4 @@ static int __init mtk_pinctrl_init(void)
 {
 	return platform_driver_register(&mtk_pinctrl_driver);
 }
-
-module_init(mtk_pinctrl_init);
-
-MODULE_LICENSE("GPL v2");
-MODULE_DESCRIPTION("MediaTek MT6397 Pinctrl Driver");
-MODULE_AUTHOR("Hongzhou Yang <hongzhou.yang@mediatek.com>");
+device_initcall(mtk_pinctrl_init);
-- 
2.6.1

  parent reply	other threads:[~2016-02-29 20:48 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-29 20:48 [PATCH 0/8] drivers/pinctrl: remove truly orphaned module code Paul Gortmaker
2016-02-29 20:48 ` Paul Gortmaker
2016-02-29 20:48 ` Paul Gortmaker
2016-02-29 20:48 ` [PATCH 1/8] drivers/pinctrl: sunxi/pinctrl-sunxi.c does not need module.h Paul Gortmaker
2016-02-29 20:48   ` Paul Gortmaker
2016-02-29 20:48   ` Paul Gortmaker
2016-03-01  7:13   ` Maxime Ripard
2016-03-01  7:13     ` Maxime Ripard
2016-03-09  2:59   ` Linus Walleij
2016-03-09  2:59     ` Linus Walleij
2016-03-09  2:59     ` Linus Walleij
     [not found] ` <1456778924-20730-1-git-send-email-paul.gortmaker-CWA4WttNNZF54TAoqtyWWQ@public.gmane.org>
2016-02-29 20:48   ` Paul Gortmaker [this message]
2016-02-29 20:48     ` [PATCH 2/8] drivers/pinctrl: make mediatek/pinctrl-mt6397 driver explicitly non-modular Paul Gortmaker
     [not found]     ` <1456778924-20730-3-git-send-email-paul.gortmaker-CWA4WttNNZF54TAoqtyWWQ@public.gmane.org>
2016-03-01 20:02       ` Hongzhou Yang
2016-03-01 20:02         ` Hongzhou Yang
2016-03-09  3:01     ` Linus Walleij
2016-03-09  3:01       ` Linus Walleij
2016-02-29 20:48 ` [PATCH 3/8] drivers/pinctrl: make meson/pinctrl-meson.c " Paul Gortmaker
2016-02-29 20:48   ` Paul Gortmaker
2016-03-09  3:04   ` Linus Walleij
2016-02-29 20:48 ` [PATCH 4/8] drivers/pinctrl: make sh-pfc/core.c " Paul Gortmaker
2016-02-29 20:48   ` Paul Gortmaker
2016-02-29 22:00   ` Laurent Pinchart
2016-03-02 11:05   ` Geert Uytterhoeven
2016-03-09  3:24   ` Linus Walleij
2016-02-29 20:48 ` [PATCH 5/8] drivers/pinctrl: make stm32/pinctrl-stm32f429.c " Paul Gortmaker
2016-02-29 20:48   ` Paul Gortmaker
2016-02-29 20:48   ` Paul Gortmaker
2016-03-01  9:01   ` Maxime Coquelin
2016-03-01  9:01     ` Maxime Coquelin
2016-03-01  9:01     ` Maxime Coquelin
2016-03-09  3:25   ` Linus Walleij
2016-03-09  3:25     ` Linus Walleij
2016-03-09  3:25     ` Linus Walleij
2016-02-29 20:48 ` [PATCH 6/8] drivers/pinctrl: make sunxi/pinctrl-sun[4-9]* " Paul Gortmaker
2016-02-29 20:48   ` Paul Gortmaker
2016-02-29 20:48   ` Paul Gortmaker
2016-03-01  7:14   ` Maxime Ripard
2016-03-01  7:14     ` Maxime Ripard
2016-02-29 20:48 ` [PATCH 7/8] drivers/pinctrl: make sunxi/pinctrl-sun9i-a80-r.c " Paul Gortmaker
2016-02-29 20:48   ` Paul Gortmaker
2016-02-29 20:48   ` Paul Gortmaker
2016-03-01  7:14   ` Maxime Ripard
2016-03-01  7:14     ` Maxime Ripard
2016-03-09  3:28   ` Linus Walleij
2016-03-09  3:28     ` Linus Walleij
2016-03-09  3:28     ` Linus Walleij
2016-02-29 20:48 ` [PATCH 8/8] drivers/pinctrl: clean up samsung modular vs. non-modular distinctions Paul Gortmaker
2016-02-29 20:48   ` Paul Gortmaker
2016-02-29 20:48   ` Paul Gortmaker
2016-03-15  8:50   ` Linus Walleij
2016-03-15  8:50     ` Linus Walleij
2016-03-15  8:50     ` Linus Walleij
2016-03-15 13:20     ` Paul Gortmaker
2016-03-15 13:20       ` Paul Gortmaker
2016-03-15 13:20       ` Paul Gortmaker
2016-03-15 10:10   ` Sylwester Nawrocki
2016-03-15 10:10     ` Sylwester Nawrocki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1456778924-20730-3-git-send-email-paul.gortmaker@windriver.com \
    --to=paul.gortmaker-cwa4wttnnzf54taoqtywwq@public.gmane.org \
    --cc=hongzhou.yang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org \
    --cc=linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=matthias.bgg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.