linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paul Gortmaker <paul.gortmaker@windriver.com>
To: <linux-mips@linux-mips.org>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>,
	John Crispin <john@phrozen.org>,
	Ralf Baechle <ralf@linux-mips.org>
Subject: [PATCH 3/4] mips: lantiq: make vmmc explicitly non-modular
Date: Mon, 15 Aug 2016 16:30:54 -0400	[thread overview]
Message-ID: <20160815203055.20541-4-paul.gortmaker@windriver.com> (raw)
In-Reply-To: <20160815203055.20541-1-paul.gortmaker@windriver.com>

The Makefile entry controlling compilation of this code is:

arch/mips/lantiq/xway/vmmc.o
   ---> arch/mips/lantiq/xway/Makefile:obj-y += vmmc.o

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

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 replace module.h with export.h since the file does actually use
EXPORT_SYMBOL.

Cc: John Crispin <john@phrozen.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 arch/mips/lantiq/xway/vmmc.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/mips/lantiq/xway/vmmc.c b/arch/mips/lantiq/xway/vmmc.c
index 4625495f9230..577ec81b557d 100644
--- a/arch/mips/lantiq/xway/vmmc.c
+++ b/arch/mips/lantiq/xway/vmmc.c
@@ -6,7 +6,7 @@
  *  Copyright (C) 2012 John Crispin <john@phrozen.org>
  */
 
-#include <linux/module.h>
+#include <linux/export.h>
 #include <linux/of_platform.h>
 #include <linux/of_gpio.h>
 #include <linux/dma-mapping.h>
@@ -55,7 +55,6 @@ static const struct of_device_id vmmc_match[] = {
 	{ .compatible = "lantiq,vmmc-xway" },
 	{},
 };
-MODULE_DEVICE_TABLE(of, vmmc_match);
 
 static struct platform_driver vmmc_driver = {
 	.probe = vmmc_probe,
@@ -64,5 +63,4 @@ static struct platform_driver vmmc_driver = {
 		.of_match_table = vmmc_match,
 	},
 };
-
-module_platform_driver(vmmc_driver);
+builtin_platform_driver(vmmc_driver);
-- 
2.8.4

WARNING: multiple messages have this Message-ID (diff)
From: Paul Gortmaker <paul.gortmaker@windriver.com>
To: linux-mips@linux-mips.org
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>,
	John Crispin <john@phrozen.org>,
	Ralf Baechle <ralf@linux-mips.org>
Subject: [PATCH 3/4] mips: lantiq: make vmmc explicitly non-modular
Date: Mon, 15 Aug 2016 16:30:54 -0400	[thread overview]
Message-ID: <20160815203055.20541-4-paul.gortmaker@windriver.com> (raw)
Message-ID: <20160815203054.q6P1fqrX0x-avjG2qyFOI4-EakRg5hdrxQFEN5i2aj8@z> (raw)
In-Reply-To: <20160815203055.20541-1-paul.gortmaker@windriver.com>

The Makefile entry controlling compilation of this code is:

arch/mips/lantiq/xway/vmmc.o
   ---> arch/mips/lantiq/xway/Makefile:obj-y += vmmc.o

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

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 replace module.h with export.h since the file does actually use
EXPORT_SYMBOL.

Cc: John Crispin <john@phrozen.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 arch/mips/lantiq/xway/vmmc.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/mips/lantiq/xway/vmmc.c b/arch/mips/lantiq/xway/vmmc.c
index 4625495f9230..577ec81b557d 100644
--- a/arch/mips/lantiq/xway/vmmc.c
+++ b/arch/mips/lantiq/xway/vmmc.c
@@ -6,7 +6,7 @@
  *  Copyright (C) 2012 John Crispin <john@phrozen.org>
  */
 
-#include <linux/module.h>
+#include <linux/export.h>
 #include <linux/of_platform.h>
 #include <linux/of_gpio.h>
 #include <linux/dma-mapping.h>
@@ -55,7 +55,6 @@ static const struct of_device_id vmmc_match[] = {
 	{ .compatible = "lantiq,vmmc-xway" },
 	{},
 };
-MODULE_DEVICE_TABLE(of, vmmc_match);
 
 static struct platform_driver vmmc_driver = {
 	.probe = vmmc_probe,
@@ -64,5 +63,4 @@ static struct platform_driver vmmc_driver = {
 		.of_match_table = vmmc_match,
 	},
 };
-
-module_platform_driver(vmmc_driver);
+builtin_platform_driver(vmmc_driver);
-- 
2.8.4

  parent reply	other threads:[~2016-08-15 20:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-15 20:30 [PATCH 0/4] mips: demodularize non-modular drivers Paul Gortmaker
2016-08-15 20:30 ` Paul Gortmaker
2016-08-15 20:30 ` [PATCH 1/4] mips: bcm47xx: make serial explicitly non-modular Paul Gortmaker
2016-08-15 20:30   ` Paul Gortmaker
2016-08-15 20:30 ` [PATCH 2/4] mips: ralink: make timer " Paul Gortmaker
2016-08-15 20:30   ` Paul Gortmaker
2016-08-15 20:30 ` Paul Gortmaker [this message]
2016-08-15 20:30   ` [PATCH 3/4] mips: lantiq: make vmmc " Paul Gortmaker
2016-08-15 20:30 ` [PATCH 4/4] mips: lantiq: make xrx200_phy_fw " Paul Gortmaker
2016-08-15 20:30   ` Paul Gortmaker

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=20160815203055.20541-4-paul.gortmaker@windriver.com \
    --to=paul.gortmaker@windriver.com \
    --cc=john@phrozen.org \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.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 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).